Jump to content

Fix Cheque / Won and Gold Exchange


Recommended Posts

  • VIP

Hey all,

easy to fix but I'm releasing because I realized many of servers(and devs) have this problem

 

problem description: when you enter decimal number in Won Exchange window (like 1.5) it will be exchanged for 150,000,000 but it will remove 1 won only so you got yang more than you should get.

 

after checking some cheque systems (including WLsj24 ones)

in quests they have check like:

if ((amount < 1) or (amount >19) or (amount == nil)) then

and it's true except that check from 1 to 19 includes decimal numbers too

so if you write 1.5 it will be exchanged to 150,000,000 and only remove 1 Won

so you should put a check for INT, you can modify it to be:

if ((amount < 1) or (amount >19) or (amount == nil) or (math.floor(amount) ~= amount)) then

(if the floor of amount is equal to amount so it's INT, otherwise it's not int)

Best Regards.

Edited by Asentrix
Link to post

They actually do since they just copy paste from tutorial. I saw several P server what came to this glitch.

The quest what contains this is official and from gayF, when they introduced cheque they had this bug too for a couple days :D

  • Love 1
Link to post
  • VIP
41 minutes ago, TMP4 said:

They actually do since they just copy paste from tutorial. I saw several P server what came to this glitch.

The quest what contains this is official and from gayF, when they introduced cheque they had this bug too for a couple days :D

yes, and that's why I posted a fix ?

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Activity

    1. 0

      Sash bug +19% absorb

    2. 1

      TRANSMUTATION WITH BLESSING SCROLL AND MAGIC STONE 100%

    3. 1

      [HowTo] The "hello world" of metin2

    4. 1

      TRANSMUTATION WITH BLESSING SCROLL AND MAGIC STONE 100%

    5. 0

      Sash absorb bug

    6. 0

      Debug DB vanilla Core

    7. 0

      Give item after kill monster [c++]

    8. 6

      Current Peer host names...

  • Recently Browsing

    No registered users viewing this page.

Shoutbox

Shoutbox

Chatroom Rules

 

Join our Discord

A request for help = Shoutbox Ban

Be respectful & Respect the rules

 

×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.