BlzS2FourCC undeclared

Level 8
Joined
Aug 5, 2014
Messages
202
Hello!

I have problem when i use BlzS2FourCC, even if it used via GUI function, editor reference this line with error: "Undeclared function BlzS2FourCC".

How to fix this problem? Im currently using pre reforged 1.31 version.

Thank you!
 
Level 24
Joined
Jun 26, 2020
Messages
1,923
Basically Blizzard being Blizzard, the function was removed from the common.j but not from GUI.
If you want to use it in Jass, better import this library: [Lua][vJass] Ascii and use the function S2A, if you still wanna use it in GUI, so also add this script:
JASS:
function BlzS2FourCC takes string s returns integer
    return S2A(s)
endfunction
In case of Lua, just use the function FourCC and add this:
Lua:
BlzS2FourCC = FourCC
 
Last edited:
Level 8
Joined
Aug 5, 2014
Messages
202
Basically Blizzard being Blizzard, the function was removed from the common.j but not from GUI.
If you want to use it in Jass, better import this library: [Lua][vJass] Ascii and use the function S2A, if you still wanna use it in GUI, so also add this script:
JASS:
function BlzS2FourCC takes string s returns integer
    return S2A(s)
endfunction
In case of Lua, just use the function FourCC and add this:
Lua:
BlzS2FourCC = FourCC

Thank you! I cant head around why it was removed from jass though.
 
Top