- Joined
- Nov 1, 2006
- Messages
- 1,612
The following code returns true for r == 0.0 and r == null. Can anyone tell me why? I would expect that only r==0.0 would return true.
I'm just starting to learn hashtables and I have been away from JASS for the better part of a year now, so I apologize if this is hashtable 101 and I'm just late to the party. Either way, any help would be very much appreciated.
JASS:
local unit t = GetTriggerUnit()
local real r = 0.0
//Save 0.0 value to hashtable
call SaveRealBJ(0.0, GetHandleIdBJ(t), 1, udg_hashTable)
//Other actions occur
//Load value from hashtable
set r = LoadRealBJ(GetHandleIdBJ(t), 1, udg_hashTable)
//Check value
if r == 0.0 then
call BJDebugMsg("r = 0.0")
endif
if r == null then
call BJDebugMsg("r is null")
endif
set t = null
I'm just starting to learn hashtables and I have been away from JASS for the better part of a year now, so I apologize if this is hashtable 101 and I'm just late to the party. Either way, any help would be very much appreciated.