add arg-3 to {coins::bal::%arg-2%} is not working for me ;( help

  • 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 community!

    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.

MrMythiccc

New Member
Nov 30, 2020
5
0
1
if arg-1 is "give":
if arg-3 is set:
add arg-3 to {coins::bal::%arg-2%}
broadcast "&3"
broadcast "&a &a&l(!) &a&lBUYCRAFT &f&lKøb"
broadcast "&3"
broadcast "&3 &a&l* &a%arg-2%&7 Har lige"
broadcast "&3 &a&l* &7købt &a&n%arg-3%&r &7Coins"
broadcast "&3"
 
Use [CODE.] and [\CODE] to format so its easier to read code:emoji_slight_smile:
3 things, send your whole command, is it broadcasting the buycraft stuff, and as Time4Games said, any errors?[/CODE]
 
Its not doing the add arg-3 to {coins::bal::%arg-2%} thing
[doublepost=1606812164,1606812134][/doublepost]Later
 
command /coin [<text>] [<offline player>] [<text>]:
permission message: &e&lCOINS &8&l* &7Du har &c&lIKKE adgang til dette
permission: admin
Trigger:
if arg-1 is not set:
message "&3"
message "&a &e&l(!) &e&lCoins"
message "&3"
message "&3 &e&l* &7Du skal skrive '&egive&7' eller &7'&etake&7' eller '&esgive&7' eller '&ereset&7' eller '&eset&7'!"
message "&3"


if arg-1 is "give":
if arg-3 is set:
set {antal.%arg-2%} to arg-3
add {antal.%arg-2%} to {coins::bal::%arg-2%}
broadcast "&3"
broadcast "&a &a&l(!) &a&lBUYCRAFT &f&lKøb"
broadcast "&3"
broadcast "&3 &a&l* &a%arg-2%&7 Har lige"
broadcast "&3 &a&l* &7købt &a&n%arg-3%&r &7Coins"
broadcast "&3"
 
You can't add text to a variable. Only an integer:
Code:
set {antal.%arg-2%} to arg-3 parsed as integer
(You can add text only into a text list/array - add "sth" to {myvar::*})
 
How are you using the command? What's the error? What is displayed? I can't tell anything from "is not working"... :emoji_rolling_eyes:
I missed that you can also use number (= parsed as number) - not only an integer.
 
You can't add text to a variable. Only an integer:
Code:
set {antal.%arg-2%} to arg-3 parsed as integer
(You can add text only into a text list/array - add "sth" to {myvar::*})
Yes, but an offline player cannot be parsed as an integer, still.
 
for the third argument, it can't be a text. It has to be an integer. So:
Code:
command /coin [<text>] [<offline player>] [<integer>]
 
Status
Not open for further replies.