Jump to content

How To Fix Cheque / Won and Gold Exchange


Recommended Posts

  • VIP
Posted (edited)

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 (see edit history)
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
  • ASIKOO changed the title to How To Fix Cheque / Won and Gold Exchange

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • 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.