• 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.

Help with custom script

Status
Not open for further replies.
Level 11
Joined
May 31, 2008
Messages
698
Can someone tell me how to fix this custom script?

Custom script: call RemoveLocation(udg_Move[(Player number of (Owner of (Triggering unit)))])

The error is Expected '('

I have tried adding and removeng numerous parentheses, but i cant figure out the correct way. And i just copied "Move[(Player number of (Owner of (Triggering unit)))]" right from my trigger

And i really need this because without it my map becomes very laggy very fast
 
Level 11
Joined
May 31, 2008
Messages
698
it worked!!! Thank you so much +rep to both of you (even tho busterkomo disabled it >.< ). BTW do you know of anywhere that i can get all (or some common) commands ...or whatever you would call them... for custom script cuz that wud be useful. I just refer to the "things that leak" thread if i forget what they are :D
 
Level 13
Joined
Sep 29, 2008
Messages
672
First set the variable in a test trigger. Like your is

  • Untitled Trigger 002
    • Events
    • Conditions
    • Actions
      • Set Move[(Player number of (Triggering player))] = (Center of (Playable map area))
Then convert this into custom text. Edit > Convert to Custom Text
Then this appears.

JASS:
function Trig_Untitled_Trigger_002_Actions takes nothing returns nothing
    set udg_Move[GetConvertedPlayerId(GetTriggerPlayer())] = GetRectCenter(GetPlayableMapRect())
endfunction

//===========================================================================
function InitTrig_Untitled_Trigger_002 takes nothing returns nothing
    set gg_trg_Untitled_Trigger_002 = CreateTrigger(  )
    call TriggerAddAction( gg_trg_Untitled_Trigger_002, function Trig_Untitled_Trigger_002_Actions )
endfunction

Then you can get the custom script there so you'll know.
"udg_Move[GetConvertedPlayerId(GetTriggerPlayer())]"

I always do this because I too don't know jass. ^^
 
Status
Not open for further replies.
Top