Jump to content
×
×
  • Create New...

Fix Cheque / Won and Gold Exchange


Recommended Posts

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 comment
Share on other sites

  • Distinguished Member

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 comment
Share on other sites

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 comment
Share on other sites

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


  • Activity

    1. 0

      Looking for Someone to create the queries etc for armors and weapons

    2. 13

      Official Private Shop Search

    3. 944

      [40250] Reference Serverfile + Client + Src [15 Available Languages]

    4. 79

      GUI Teleport System

    5. 0

      inventory slot marking system cant compile

    6. 8

      Inventory Bug

    7. 63

      Metin2 Dev - Changelogs

  • Recently Browsing

    • No registered users viewing this page.

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.