• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

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,243
  • 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