- Joined
- Oct 14, 2023
- Messages
- 9
After some digging it is clear that Custom Script uses a different method to translate the code from the Editor to war3map.j than Triggers do.
So in a Custom Script a single "%" gives "" except a Conversion Specifier(printf reference) followes even with spaces, same function in a Trigger no change.
Here are some exempels:
To use "%" in Custom Script you have to use "%%" to get "%" in war3map.j.
I don't know why they behave differently, but my best guess is that Custom Scripts are added to war3map.j with printf and Triggers with some other methode.
I hope if someone else stumbles about this, this helps.
So in a Custom Script a single "%" gives "" except a Conversion Specifier(printf reference) followes even with spaces, same function in a Trigger no change.
Here are some exempels:
JASS:
In the Editor:
local string s = "%"
set s = "% and"
set s ="%% and"
When it was in a Custom Script in war3map.j:
local string s = ""
set s = "0x0.000000000000ap-1022nd"
set s ="% and"
When it was in a Trigger in war3map.j:
local string s = "%"
set s = "% and"
set s ="%% and"
I don't know why they behave differently, but my best guess is that Custom Scripts are added to war3map.j with printf and Triggers with some other methode.
I hope if someone else stumbles about this, this helps.