#It only take 98, Im trying to get it to take a certain amount of 100 bills

1 messages · Page 1 of 1 (latest)

quaint pond
#

you can just use remove X from player's balance yk

soft glade
quaint pond
#

also are you aware that {withdraw100_} is not a local variable

#

try broadcasting it ig, or re-parsing it as an integer

soft glade
#

how

quaint pond
#

how what

soft glade
#

why does it say -98 when I type /withdraw100bill 2

soft glade
#

still -98

soft glade
#

did that, seems as if the variable is -98

distant prawn
#

^ if you are going to use a varaible here it should be local

#

but

#

variables are used to store information so that

  • it can be used elsewhere
  • it can be saved and used later
#

this does neither, you have a perfectly good expression to use

distant prawn
#

well,

soft glade
distant prawn
#

the variable is the exact same as arg-1 * 100, you can just plug that in

soft glade
soft glade
#

it should be 200 since I typed 2

distant prawn
#

debug

#

broadcast the arg

#

also, the paper you give them is always named $100, and will not change if they increase/decrease the arg

soft glade
#

I want you to be able to say how many 100 bills you want to withdraw

distant prawn
#

although in that case as you cannot have fractional bills, i would use an integer instead of number

#

also add a check to make sure its > 0

soft glade
#

it's always -100+{the number i wrote}

soft glade
distant prawn
#

maybe arg-1 is thinking argument minus one, and then times 100.
either use parenthesis, or just arg

#

but what version of skript are you using? ive hyphenated args when i only had one and have never had this issue

#

try (arg-1) * 100

soft glade