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?
 
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?
 
  • 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.
 
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.
Back
Top