# Solved Different variables are seemingly the same

Discussion in 'Skript' started by CreeperOverLord7, Apr 13, 2022.

Tags:
Not open for further replies.
1. ### CreeperOverLord7 Member

Joined:
Jan 19, 2018
Messages:
17
1
Skript Version: 2.6.1
Skript Authors: Njol, Mirreski, SkriptLang Team and Contributors
Minecraft Version: 1.16.5 (Paper version git-Paper-794)

Full Code:
Code (Text):
1. # set a and b
2. set {a} to "00000000110101101010101011010110100000101101011010000010101110101010101010101010101110101000001011010110100000101000001010000010"
3. set {b} to "00000000000000000000000000110000001100000011000000110000001100000011000000110000000000000011000000110000000000000000000000000000"
4. # confirm that a != b
5. broadcast "%true if {a} = {b} else false%"
6. # list vars
7. set {var::%{a}%::*} to 1, 2, 3
8. set {var::%{b}%::*} to 4, 5, 6
9. # now why is {var::%{a}%::*} = 4, 5, 6 ?
12. # (presumably because they are the same variable, but that can't be!)
Code output:

Expected output:
Code (Text):
1. a: 1, 2, 3
2. b: 4, 5, 6
(No errors, no addon syntax used)

#1
Post #3 by CreeperOverLord7, Apr 14, 2022
3. ### Mich Active Member

Joined:
Jul 15, 2020
Messages:
148
5
Try {var %{a}%::*} and {var %{b}%::*} to see if the problem is the variable
--- Double Post Merged, Apr 14, 2022, Original Post Date: Apr 14, 2022 ---
You can also try {var::%{a}%}

#2
4. ### CreeperOverLord7 Member

Joined:
Jan 19, 2018
Messages:
17
1
I managed to fix this, although not sure about exactly what is happening with the {a} and {b} indexes.
I tried this with long strings of other characters (like UUIDs), and they seemed to work, so the problem is that the index contains a very large number. The fix was splitting up the numbers with some character, such as putting a hyphen "-" every 16 characters in the index.
TL;DR Big indexes are OK, just not numbers.

#3
• Agree x 1
5. ### Mich Active Member

Joined:
Jul 15, 2020
Messages:
148
5
I dint know that

#4
Not open for further replies.