- Joined
- Nov 4, 2007
- Messages
- 933
So will I need to have a different hashtable for each object I intend to store, such as hashtable for units, hashtable for locations, etc... or can one hashtable cover all bases?
Yeah, that's the return bug. Basically, you need to fix your map.lol at your name, whale boobs
And why is that "weird"?
So once again, Blizzard has failed the updation of its own game, causing many of the users to be pissed, others annoyed.
I don't know what you need to change without seeing the codes in your map which cause the errors. Basically, any instance of using H2I or anything similar has to be replaced. If you're using Local Handle Vars, replace it with Faux Handle Vars. Anything else, just ask me.Yeah, just saw a pictures of a whale penis but im not so into that so whale boobs fits me very well.
Alright.. Any tips on how to do this, Im not so familiar with Jass but i understand the basics.
So what do i need to change? Do i need to put every single variable into a hash table? Help appreciated.
I don't know what you need to change without seeing the codes in your map which cause the errors. Basically, any instance of using H2I or anything similar has to be replaced. If you're using Local Handle Vars, replace it with Faux Handle Vars. Anything else, just ask me.
function CS_H2I takes handle h returns integer
return h
return 0
endfunction
//=================================================================================================
// Main Gamecache handler
//
function CSCache takes nothing returns gamecache
if udg_cscache==null then
call FlushGameCache(InitGameCache("CasterSystem.vx"))
set udg_cscache=InitGameCache("CasterSystem.vx")
call StoreInteger(udg_cscache,"misc","TableMaxReleasedIndex",100)
endif
return udg_cscache
endfunction
Damn, im not sure but im using "CS_H2I" and "CS Gamecache".
My code begins with:
Code:function CS_H2I takes handle h returns integer return h return 0 endfunction //================================================================================================= // Main Gamecache handler // function CSCache takes nothing returns gamecache if udg_cscache==null then call FlushGameCache(InitGameCache("CasterSystem.vx")) set udg_cscache=InitGameCache("CasterSystem.vx") call StoreInteger(udg_cscache,"misc","TableMaxReleasedIndex",100) endif return udg_cscache endfunction
I uploaded the map if someone wants to take a look; http://www.megaupload.com/?d=XZEACIUC
I hate hash tables. >.<
Nah, just replace CSCache with a different, more up-to-date version such as Table 3.0, TimerUtils, etc.
You must learn to love it, its the only way to fix your problem, since you're using CSCache.
just create one hashtable,
Also if you have any systems, you might one to check those, since most systems doesn't work in 1.24. CSSafeCache which was suppose to comply with 1.24 does not...
pretend that parent key is the target handle, and the child key is the string identifier in CSCache. You will need GetHandleId() to convert the target handle to an integer key, and you will need StringHash to convert your string identifier to an integer key as well.
Then wallah, just like CSCache...
Ah well, Thx for your answer sounds pretty understandable but in practice i just have no idea of what to do.
So do i really need to learn how to fix CSCache or can i wait for blizzard to fix these issues? Or should i re-create my map from step one and try to include hash tables? (now that would be really annoying)
Thx for helping me out
function b takes nothing returns nothing
call BJDebugMsg(GetAttachedString(GetExpiredTimer(),"msg"))
endfunction
function a takes nothing returns nothing
local timer m = CreateTimer()
local string s = "hi"
call AttachString(m,"msg",s)
call TimerStart(m,10,false,function b)
endfunction
function b takes nothing returns nothing
call BJDebugMsg(LoadStr(udg_table,GetHandleId(GetExpiredTimer()),StringHash("msg")))
endfunction
function a takes nothing returns nothing
local timer m = CreateTimer()
local string s = "hi"
call SaveStr(udg_table,GetHandleId(m),StringHash("msg"),s)
call TimerStart(m,10,false,function b)
endfunction
type hashtable extends handle
native GetHandleId takes handle h returns integer
native StringHash takes string s returns integer
native InitHashtable takes nothing returns hashtable
native SaveInteger takes hashtable table, integer parentKey, integer childKey, integer value returns nothing
native SaveReal takes hashtable table, integer parentKey, integer childKey, real value returns nothing
native SaveBoolean takes hashtable table, integer parentKey, integer childKey, boolean value returns nothing
native SaveStr takes hashtable table, integer parentKey, integer childKey, string value returns boolean
native SavePlayerHandle takes hashtable table, integer parentKey, integer childKey, player whichPlayer returns boolean
native SaveWidgetHandle takes hashtable table, integer parentKey, integer childKey, widget whichWidget returns boolean
native SaveDestructableHandle takes hashtable table, integer parentKey, integer childKey, destructable whichDestructable returns boolean
native SaveItemHandle takes hashtable table, integer parentKey, integer childKey, item whichItem returns boolean
native SaveUnitHandle takes hashtable table, integer parentKey, integer childKey, unit whichUnit returns boolean
native SaveAbilityHandle takes hashtable table, integer parentKey, integer childKey, ability whichAbility returns boolean
native SaveTimerHandle takes hashtable table, integer parentKey, integer childKey, timer whichTimer returns boolean
native SaveTriggerHandle takes hashtable table, integer parentKey, integer childKey, trigger whichTrigger returns boolean
native SaveTriggerConditionHandle takes hashtable table, integer parentKey, integer childKey, triggercondition whichTriggercondition returns boolean
native SaveTriggerActionHandle takes hashtable table, integer parentKey, integer childKey, triggeraction whichTriggeraction returns boolean
native SaveTriggerEventHandle takes hashtable table, integer parentKey, integer childKey, event whichEvent returns boolean
native SaveForceHandle takes hashtable table, integer parentKey, integer childKey, force whichForce returns boolean
native SaveGroupHandle takes hashtable table, integer parentKey, integer childKey, group whichGroup returns boolean
native SaveLocationHandle takes hashtable table, integer parentKey, integer childKey, location whichLocation returns boolean
native SaveRectHandle takes hashtable table, integer parentKey, integer childKey, rect whichRect returns boolean
native SaveBooleanExprHandle takes hashtable table, integer parentKey, integer childKey, boolexpr whichBoolexpr returns boolean
native SaveSoundHandle takes hashtable table, integer parentKey, integer childKey, sound whichSound returns boolean
native SaveEffectHandle takes hashtable table, integer parentKey, integer childKey, effect whichEffect returns boolean
native SaveUnitPoolHandle takes hashtable table, integer parentKey, integer childKey, unitpool whichUnitpool returns boolean
native SaveItemPoolHandle takes hashtable table, integer parentKey, integer childKey, itempool whichItempool returns boolean
native SaveQuestHandle takes hashtable table, integer parentKey, integer childKey, quest whichQuest returns boolean
native SaveQuestItemHandle takes hashtable table, integer parentKey, integer childKey, questitem whichQuestitem returns boolean
native SaveDefeatConditionHandle takes hashtable table, integer parentKey, integer childKey, defeatcondition whichDefeatcondition returns boolean
native SaveTimerDialogHandle takes hashtable table, integer parentKey, integer childKey, timerdialog whichTimerdialog returns boolean
native SaveLeaderboardHandle takes hashtable table, integer parentKey, integer childKey, leaderboard whichLeaderboard returns boolean
native SaveMultiboardHandle takes hashtable table, integer parentKey, integer childKey, multiboard whichMultiboard returns boolean
native SaveMultiboardItemHandle takes hashtable table, integer parentKey, integer childKey, multiboarditem whichMultiboarditem returns boolean
native SaveTrackableHandle takes hashtable table, integer parentKey, integer childKey, trackable whichTrackable returns boolean
native SaveDialogHandle takes hashtable table, integer parentKey, integer childKey, dialog whichDialog returns boolean
native SaveButtonHandle takes hashtable table, integer parentKey, integer childKey, button whichButton returns boolean
native SaveTextTagHandle takes hashtable table, integer parentKey, integer childKey, texttag whichTexttag returns boolean
native SaveLightningHandle takes hashtable table, integer parentKey, integer childKey, lightning whichLightning returns boolean
native SaveImageHandle takes hashtable table, integer parentKey, integer childKey, image whichImage returns boolean
native SaveUbersplatHandle takes hashtable table, integer parentKey, integer childKey, ubersplat whichUbersplat returns boolean
native SaveRegionHandle takes hashtable table, integer parentKey, integer childKey, region whichRegion returns boolean
native SaveFogStateHandle takes hashtable table, integer parentKey, integer childKey, fogstate whichFogState returns boolean
native SaveFogModifierHandle takes hashtable table, integer parentKey, integer childKey, fogmodifier whichFogModifier returns boolean
native LoadInteger takes hashtable table, integer parentKey, integer childKey returns integer
native LoadReal takes hashtable table, integer parentKey, integer childKey returns real
native LoadBoolean takes hashtable table, integer parentKey, integer childKey returns boolean
native LoadStr takes hashtable table, integer parentKey, integer childKey returns string
native LoadPlayerHandle takes hashtable table, integer parentKey, integer childKey returns player
native LoadWidgetHandle takes hashtable table, integer parentKey, integer childKey returns widget
native LoadDestructableHandle takes hashtable table, integer parentKey, integer childKey returns destructable
native LoadItemHandle takes hashtable table, integer parentKey, integer childKey returns item
native LoadUnitHandle takes hashtable table, integer parentKey, integer childKey returns unit
native LoadAbilityHandle takes hashtable table, integer parentKey, integer childKey returns ability
native LoadTimerHandle takes hashtable table, integer parentKey, integer childKey returns timer
native LoadTriggerHandle takes hashtable table, integer parentKey, integer childKey returns trigger
native LoadTriggerConditionHandle takes hashtable table, integer parentKey, integer childKey returns triggercondition
native LoadTriggerActionHandle takes hashtable table, integer parentKey, integer childKey returns triggeraction
native LoadTriggerEventHandle takes hashtable table, integer parentKey, integer childKey returns event
native LoadForceHandle takes hashtable table, integer parentKey, integer childKey returns force
native LoadGroupHandle takes hashtable table, integer parentKey, integer childKey returns group
native LoadLocationHandle takes hashtable table, integer parentKey, integer childKey returns location
native LoadRectHandle takes hashtable table, integer parentKey, integer childKey returns rect
native LoadBooleanExprHandle takes hashtable table, integer parentKey, integer childKey returns boolexpr
native LoadSoundHandle takes hashtable table, integer parentKey, integer childKey returns sound
native LoadEffectHandle takes hashtable table, integer parentKey, integer childKey returns effect
native LoadUnitPoolHandle takes hashtable table, integer parentKey, integer childKey returns unitpool
native LoadItemPoolHandle takes hashtable table, integer parentKey, integer childKey returns itempool
native LoadQuestHandle takes hashtable table, integer parentKey, integer childKey returns quest
native LoadQuestItemHandle takes hashtable table, integer parentKey, integer childKey returns questitem
native LoadDefeatConditionHandle takes hashtable table, integer parentKey, integer childKey returns defeatcondition
native LoadTimerDialogHandle takes hashtable table, integer parentKey, integer childKey returns timerdialog
native LoadLeaderboardHandle takes hashtable table, integer parentKey, integer childKey returns leaderboard
native LoadMultiboardHandle takes hashtable table, integer parentKey, integer childKey returns multiboard
native LoadMultiboardItemHandle takes hashtable table, integer parentKey, integer childKey returns multiboarditem
native LoadTrackableHandle takes hashtable table, integer parentKey, integer childKey returns trackable
native LoadDialogHandle takes hashtable table, integer parentKey, integer childKey returns dialog
native LoadButtonHandle takes hashtable table, integer parentKey, integer childKey returns button
native LoadTextTagHandle takes hashtable table, integer parentKey, integer childKey returns texttag
native LoadLightningHandle takes hashtable table, integer parentKey, integer childKey returns lightning
native LoadImageHandle takes hashtable table, integer parentKey, integer childKey returns image
native LoadUbersplatHandle takes hashtable table, integer parentKey, integer childKey returns ubersplat
native LoadRegionHandle takes hashtable table, integer parentKey, integer childKey returns region
native LoadFogStateHandle takes hashtable table, integer parentKey, integer childKey returns fogstate
native LoadFogModifierHandle takes hashtable table, integer parentKey, integer childKey returns fogmodifier
native HaveSavedInteger takes hashtable table, integer parentKey, integer childKey returns boolean
native HaveSavedReal takes hashtable table, integer parentKey, integer childKey returns boolean
native HaveSavedBoolean takes hashtable table, integer parentKey, integer childKey returns boolean
native HaveSavedString takes hashtable table, integer parentKey, integer childKey returns boolean
native HaveSavedHandle takes hashtable table, integer parentKey, integer childKey returns boolean
native RemoveSavedInteger takes hashtable table, integer parentKey, integer childKey returns nothing
native RemoveSavedReal takes hashtable table, integer parentKey, integer childKey returns nothing
native RemoveSavedBoolean takes hashtable table, integer parentKey, integer childKey returns nothing
native RemoveSavedString takes hashtable table, integer parentKey, integer childKey returns nothing
native RemoveSavedHandle takes hashtable table, integer parentKey, integer childKey returns nothing
native FlushParentHashtable takes hashtable table returns nothing
native FlushChildHashtable takes hashtable table, integer parentKey returns nothing
New map size, fuck yes.
8 mbs... but will ppl dl 8mb maps?!??! I'm sure this will be fortunate for DotA since players usually don't care waiting to dl for dota or they usually go to getdota.com...
What do you mean?Please create a thread ASAP if there's any new patches, wait there IS going to be one right?
One thing I wonder. Where is the source of the 8mb rumor I hear everywhere? I could not see that change in the changelogs....
Well, will 1.24b be released?
Quite frankly, I am really disappointed with Blizzard right now.
This patch just messes everything up. Old maps that used to work fine now cannot be loaded at all, and these maps are basically the only thing I host on Battle.net. So yeah, basically can't play battle.net anymore because of this new patch. It seems like these maps are never going to be able to work properly after they fix this "diabolical" return bug, which I have never encountered in my 4 or 5 years of playing Warcraft. Seriously, what the f*ck is the return bug, anyway?
Like all patches, this patch makes replays unreadable, so no more replays :\ .
Oh, and this is the best part. The world editor on the mac has never been upgraded for literally a year, so these cute new natives that blizzard added don't work. What that means is that I can't make triggers anymore, which makes the world editor next to useless. Way to go guys.
This may very well be the greatest patch ever. I would really love to be payed for destroying my own game if I was a Blizzard employee.
I really hope they get this sorted out soon...
function H2I takes handle h returns integer
return h
return 0
endfunction
function H2I takes handle h returns integer
return GetHandleId(h)
endfunction
Quite frankly, I am really disappointed with Blizzard right now.
This patch just messes everything up. Old maps that used to work fine now cannot be loaded at all, and these maps are basically the only thing I host on Battle.net. So yeah, basically can't play battle.net anymore because of this new patch. It seems like these maps are never going to be able to work properly after they fix this "diabolical" return bug, which I have never encountered in my 4 or 5 years of playing Warcraft. Seriously, what the f*ck is the return bug, anyway?
Like all patches, this patch makes replays unreadable, so no more replays :\ .
Oh, and this is the best part. The world editor on the mac has never been upgraded for literally a year, so these cute new natives that blizzard added don't work. What that means is that I can't make triggers anymore, which makes the world editor next to useless. Way to go guys.
This may very well be the greatest patch ever. I would really love to be payed for destroying my own game if I was a Blizzard employee.
I really hope they get this sorted out soon...
Stop dissing Blizz. They are saving you from Trojans and other viruses..
Vexorian said:You seem to be missing a lot of context to this discussion. The return bug allowed an exploit, you know maps with viruses on them. Not only that but it was apparently not enough with banning code returns, so they had to remove the return bug.
If the return bug was correctly removed, they would be fixing an exploit. The only reason that this patch doesn't fix anything is because they didn't remove the return bug correctly. Fixing security vulnerabilities often are more important than any 'promise' [blizzard's promise not to remove the return bug]
Nobody in his right mind used anything but H2I anyway, there were countless of opportunities to stop using the other return bug exploiters these last 3 years. They added GetHandleId, So, really, the problem is not with the decision to remove the return bug, it wouldn't really harm maps that much , the real problem is with the fact they didn't remove it correctly, causing false negatives and false positives. It is a bug not a feature.
No they did not. Hey, I could live with a patch breaking backwards compatibility. I could live with having to replace all H2I calls. But blizzard did NOT fix the actual exploit. I could live with the new patch if they actually did it the right way.
No, what they did now is overcomplicate the compiler, introducing new bugs that have nothing to do with the exploit, even breaking their own maps and other maps too that do not use the returnbug or don't even use jass. Yes, I've had a GUI map that causes the editor to crash because they apparently made some crucial change to GUI too. Frack, we were unable to open wc3:wow campaign because of the new patch. That your map doesn't work, I can accept, but that world edit suddenly crashes? No.
I could live with a patch ruining backwards compatibility, if they hadn't screwed it up like this. Yes, I can perfectly dis blizzard for introducing new bugs and not even fixing the exploit.
Normal GUI.