| 07-21-2009, 05:00 AM | #1 |
I'm sure a bunch of you have already run into some of them. I found this one particularly annoying: JASS:
//HaveSavedInteger always returns false
local hashtable t = InitHashtable()
call SaveInteger(t, 0, 0, 1)
if not HaveSavedInteger(t, 0, 0) then
call BJDebugMsg("Have = false") //this line executes
endif
call BJDebugMsg("Load = " + I2S(LoadInteger(t, 0, 0))) //prints 1
|
| 07-21-2009, 05:11 AM | #2 |
I should have mentioned, that bug is only in 1.23b, not the newer 1.24. EDIT: And yes it is a pain in the ass. It basically acts like HaveSavedHandle instead. |
| 07-21-2009, 12:40 PM | #3 |
wait, are you talking about 1.23b still? the reason they brought out 1.24 was exactly this issues, afair |
| 07-22-2009, 02:16 AM | #4 |
Hashtables say they don't have a value for the given key, if null is added as the value. This one is a bit debatable, but I really think this is a bug. There's a difference between 'added with no value' and 'not added'. JASS:
local hashtable t = InitHashtable()
call SaveUnitHandle(t,2,2,null)
if not HaveSavedHandle(t,2,2) then
call BJDebugMsg("don't have unit")
endif
|
| 07-22-2009, 02:18 AM | #5 |
Alright, this has been tested in 1.24, and is taken from the other thread. RemoveSavedBoolean doesn't work. JASS:
local hashtable t = InitHashtable()
call SaveBoolean(t,2,2,true)
call RemoveSavedBoolean(t,2,2)
if LoadBoolean(t,2,2) then
call BJDebugMsg("Still true") //this line is executed
endif
if HaveSavedBoolean(t,2,2) then
call BJDebugMsg("still have") //this line is executed
endif
The same goes for RemoveSavedInteger and apparently RemoveSavedString. Haven't tested all the cases. RemoveSavedHandle seems to work. |
| 07-31-2009, 05:13 PM | #6 |
What is the FlushChildHashTable bug I've been hearing about? Also are there any other issues with the new stuff? |
