13lade619
is now a game developer :)
- Reaction score
- 398
Ok.. main question of this thread is:
I know that my problem is not in scripting/syntax because
a) the problem does not happen always.,
b) it is minimally replicable (i have not found the EXACT cause.)
So i figured it might be some weird conflict with something in my map.
The problem is this generated error message:
What i found out regarding probable errors on syntax:
How do you wrongfully have a "(null)" unit in run-time / in-game
I know that my problem is not in scripting/syntax because
a) the problem does not happen always.,
b) it is minimally replicable (i have not found the EXACT cause.)
So i figured it might be some weird conflict with something in my map.
The problem is this generated error message:
JASS:
function GetUnitId takes unit u returns integer
debug if u==null then
debug call BJDebugMsg("|cFFFF0000Error using AIDS:|r Trying to get the id (inlines) of null unit.")
debug call BJDebugMsg(GetUnitName(u))
debug endif
return GetUnitUserData(u)
endfunction
What i found out regarding probable errors on syntax:
JASS:
call GetUnitId(null) //This will correctly show the error message.
local unit x = null
call GetUnitId(x) //This will correctly show the error message.
local unit x = null
set x = CreateUnit(Player(0),039;n00B039;,0,0,0)
call KillUnit(x)
call TriggerSleepAction(1) //A unit dies before getting processed, index goes through the recycler.
call GetUnitId(x) //This NOT show any error... it proceeds normally.
//however...
local unit x //undeclared
call GetUnitId(x) //This will STOP the entire thread.
//But AFAIK, i'm not having this kind of error.