• 🏆 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!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

is this correct?

Status
Not open for further replies.
Level 5
Joined
Nov 25, 2004
Messages
65
i was trying to destroy a 'location' i stored inside a hashtable. but apparently, it does not work. below is the custom script i used

  • Custom script: call RemoveLocation(LoadLocationHandle(udg_Hash, StringHash("point"), StringHash("location")))
is the script correct?
 
Level 5
Joined
Nov 25, 2004
Messages
65
JASS:
function LoadLocationHandleBJ takes integer key, integer missionKey, hashtable table returns location
    return LoadLocationHandle(table, missionKey, key)
endfunction
did you swap missionKey and key?

coordinates are better anyway ;)

okay. i did something new. take a look below


  • Untitled Trigger 001
    • Events
    • Conditions
    • Actions
      • Hashtable - Save Handle Of(Position of (Last created unit)) as (Key alpha) of (Key beta) in myPrivateStore
      • Custom script: call RemoveLocation(LoadLocationHandle(udg_myPrivateStore, StringHash("beta"), StringHash("alpha")))
did i done it correctly?

btw, why are coordinates better than location?
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
  • Untitled Trigger 001
    • Events
    • Conditions
    • Actions
      • Hashtable - Save Handle Of(Position of (Last created unit)) as (Key alpha) of (Key (Last created unit)) in myPrivateStore
      • Custom script: call RemoveLocation(LoadLocationHandle(udg_myPrivateStore, GetHandleId(bj_lastCreatedUnit), StringHash("alpha")))
But in the trigger where you remove the location, the unit you refer to should not be referred with bj_lastCreatedUnit.
 
Level 9
Joined
Jul 4, 2007
Messages
130
I mean… replace the location by an unit, since a location is invisible you can't test your script, so unstead of removing something invisible your gonna remove the unit so you can see if it works and avoid posting such things: "did i done it correctly?"
 
Status
Not open for further replies.
Top