The {chance.%%} is <none>

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

DuckOfMagic

New Member
Jul 30, 2024
6
2
3
23
Skript, Skuishy, etc..
1.20.6

These two variables should be the same but fails to do so

Code:
Set {chance.%held item%} to 5

Send "{chance.%loop-item-2}" to player

Ive already tested that the items should be the same

Ex: {chance.hat named "&4Cap}
 
Last edited:
Skript, Skuishy, etc..
1.20.6
Code:
on right click:
 if player is holding a chest:
  loop items in {chest::*}:
   if event-item is loop-item:
    cancel event
    loop items in {loot.%name of loop-item-1%::*}:
     send "%{chance.%loop-item-2%}%" to player
     chance of {chance.%loop-item-2%}%:
 
  if argument 1 is "add":
   if arg-2 is set:
    if arg-3 is set:
     add held item to {loot.&lLootCrate &4%arg-2%::*}
     set {chance.%held item%} to argument 3
     send "%{chance.%held item%}%" to player
     send "&4%held item% has been added
 to %arg-2%" to player

When i set the chance variabke it dosent transfer to the top code even though they should be the same and they show up as the same
First off, how bad could this post have originally been in order for it to be edited by the moderator :emoji_sob: he didn't even edit the spelling mistakes

Second, when you say 'etc.' what does that mean? It's not 'etc' if I don't even understand what you mean by that.

But I think I might have found the error. In line 8, where it says 'chance of {your var}%:', you actually added a percent sign at the end of the variable where it shouldn't be. Sometimes it's the silly mistakes :emoji_relaxed:
 
First off, how bad could this post have originally been in order for it to be edited by the moderator :emoji_sob: he didn't even edit the spelling mistakes

Second, when you say 'etc.' what does that mean? It's not 'etc' if I don't even understand what you mean by that.

But I think I might have found the error. In line 8, where it says 'chance of {your var}%:', you actually added a percent sign at the end of the variable where it shouldn't be. Sometimes it's the silly mistakes :emoji_relaxed:
Didnt work but i edited it so it makes a bit more sense (the edit was for code end and start)
 
Last edited:
Didnt work but i edited it so it makes a bit more sense (the edit was for
Code:
 end and start])
I'm not quite sure if looping items in a chest work. I've tried looping items in a shoulder before, and it didn't work for me, so maybe that's the problem. Try to broadcast the items it's looping to see if it's actually looping the items in the chest.
 
I'm not quite sure if looping items in a chest work. I've tried looping items in a shoulder before, and it didn't work for me, so maybe that's the problem. Try to broadcast the items it's looping to see if it's actually looping the items in the chest.
Ive done that and im looping in a list not a chest