- Joined
- Apr 30, 2011
- Messages
- 359
there's something wrong with percent (%) . . .
and a little wrong for "|" . . .
i tried to do something like this:
for percent (%), it can be fixed by typing the percent twice (%%)
for "|", can't be fixed, but can be evaded by typing "|" twice (||)
and a little wrong for "|" . . .
i tried to do something like this:
JASS:
local string s = "!@#$%^&*()|"
call BJDebugMsg(SubString(s, udg_int, udg_int + 1))
// if udg_int = 4
// the result should show a "%"
// but it doesn't, it shows the next character instead (^)
// if udg_int = 10
// the result shows a "|"
// but i tried that for many characters at once,
// and it turned out to be . . .
// 1. first "|" will be shown just normally
// 2. next "|" will be hidden
// 3. next "|" will be shown
// 4. next "|" will be hidden
// 5. . . . . .
for percent (%), it can be fixed by typing the percent twice (%%)
"%%" = "%"
for "|", can't be fixed, but can be evaded by typing "|" twice (||)
// to avoid some bugs of "|" (only for game message i guess)
/* change */ "|" /* to */ "||"
Last edited: