• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

World Editor Crash

Status
Not open for further replies.
Level 13
Joined
Aug 19, 2014
Messages
1,111
I'm using the action type Hastable - Save Ability Handle and upon clicking the Ability my editor crashes. Does anyone encounter this error?
 
Level 15
Joined
Oct 29, 2012
Messages
1,474
Hmm, it's not the only function that crashes (considering the Hashtable's tab), well 'Save Region, Widget , EventID , ...' all crash.

Now since the problem here is the ability. You can save the ability's ID as a "string" using 'Save String in Hashtable'... then when you load it, use the jass function to load it (since it uses Abilities' IDs) ... and in ID's place, use String2ID and load that saved string in Hashtable.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
They crash because WC3 is a buggy, poorly documented mess.

Some poor Blizzard employees were forced to maintain Warcraft III after a critical security exploit was discovered involving typecasting code to allow arbitrary code execution. This is when they added the GetHandleId, the string hash, and hashtable natives we are so fond of today.

When adding these new features to GUI they saw GUI had "Region", "Ability", and other such types so decided to link it to them, after all people might find it useful. What they failed to spot was these types are a lie. GUI "Region" is actually a JASS rect, with JASS region being something completely different and entirely unsupported in GUI. Like wise GUI "Ability" is actually JASS integer, with JASS ability being an entirely unsupported WC3 type, probably representing internal functionality that cannot be accessed (no natives to manipulate) or a relic from early days of development. Non the less GUI actions were added to reference these unsupported in GUI types. As one knows the editor crashes as soon as they are processed.

One cannot really say the guys who made the mistake were to blame. Ultimately the blame falls with the developers of WC3 GUI who made it so poorly written, confusing and error prone in the first place. Fortunately SC2 GUI is considerably better engineered with much better linking between GUI and Galaxy script.
 
Level 13
Joined
Aug 19, 2014
Messages
1,111
Thanks for the comments guys and sorry for my late reply, I've been inactive these days. Any other way to save the ability in a hashtable, without writing it in Jass? My trigger is GUI.
 
Level 13
Joined
Aug 19, 2014
Messages
1,111
Hmmmm.... is that the Custom script where you call a function? Where can I see some example functions that I would write there? Like the Hastable - Save Ability Handle, how can I write it in the Custom script?
 
Status
Not open for further replies.
Top