Multiplication not Working

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

pokw

Active Member
Jun 3, 2019
53
1
8
Script Version (do not put latest): 2.5.3
Minecraft Version: 1.16.5
Code:
            else if {_level} is less than 100:
                set {_totalcost} to (16000 * {_level}) - 590000
            else if {_level} is more or equal to 100:
                #do something
                stop
            set {_price} to {_totalcost} - {%player's uuid%.levelspent}
            if {%player's uuid%.gold} is less than {_price}:
                send "&cError: &rNot enough gold."
                play sound "ENTITY_VILLAGER_NO" to player
            else:
                add 1 to {%player's uuid%.level}
                send "&aPurchase: &rLevel %{%player's uuid%.level}%"
                send "%{_price}%"
                send "%{_level}%"
                set {_amount} to {_level} * {_price} parsed as integer
                send "%{_amount}%"
                play sound "ENTITY_EXPERIENCE_ORB_PICKUP" to player
                add {_price} to {%player's uuid%.levelspent}
                close the player's inventory
                make player execute command "/90fjslk3"

Other Useful Info:
I am multiplying price and level which are 3600 and 28 respectively. When I do this, it gives me 0. It shouldn't be doing this and I'm not sure why it is. The math has been triple checked and I am sure it is correct. Hopefully someone can help, thanks.
unknown.png


Addons using (including versions):
SkPerm, SkQuery, TuSKe, Skellet
 
Last edited:
Status
Not open for further replies.