• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to 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?
 
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