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

RemoveLocation causes a Script error. Help?

Status
Not open for further replies.
Level 4
Joined
Jan 28, 2013
Messages
94
I have this trigger which I have been working on to remove any potential leaks. Then I decided to Ping the map at location and then emit visibility across it like they do in the campaign. However I run into a script error in: call RemoveLocation_(ugd_TempPingLocSF) The error reads: Expected name. What did I do wrong?

  • Scout the town Create
    • Events
      • Destructible - Rock Chunks 0000 <gen> dies
    • Conditions
    • Actions
      • Set TempPingLocSF = (Center of Silver Fall <gen>)
      • Cinematic - Ping minimap for HumanArmy at TempPingLocSF for 3.00 seconds, using a Simple ping of color (0.00%, 100.00%, 50.00%)
      • Wait 3.00 seconds
      • Custom script: call RemoveLocation(ugd_TempPingLocSF)
      • Visibility - Create an initially Enabled visibility modifier for Player 1 (Red) emitting Visibility across ShowLocSF <gen>
      • Set ShowSFLoc = (Last created visibility modifier)
      • Quest - Create a Required quest titled Investigate Silver ... with the description We haven't heard fr..., using icon path ReplaceableTextures\PassiveButtons\PASBTNPillage.blp
      • Set ScoutTown = (Last created quest)
      • Quest - Create a quest requirement for ScoutTown with the description Scout the town
      • Set ScoutTownReq = (Last created quest requirement)
      • Quest - Flash the quest dialog button
      • Quest - Display to HumanArmy the Quest Update message: |cFFFFD700Main Ques...
      • Wait 5.00 seconds
      • Quest - Display to HumanArmy the Hint message: |c00006400Hint:|r B...
      • Destructible - Destroy Gate (Vertical) 0252 <gen>
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in Arrival2SF <gen> owned by Player 3 (Teal)) and do (Unit Group - Add (Picked unit) to SFundeadforce)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in Silver Fall <gen> owned by Player 3 (Teal)) and do (Unit Group - Add (Picked unit) to SFundeadforce)
I am still using GUI and is just getting into these Custom Scripts.
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
I have this trigger which I have been working on to remove any potential leaks. Then I decided to Ping the map at location and then emit visibility across it like they do in the campaign. However I run into a script error in: call RemoveLocation_(ugd_TempPingLocSF) The error reads: Expected name. What did I do wrong?

  • Scout the town Create
    • Events
      • Destructible - Rock Chunks 0000 <gen> dies
    • Conditions
    • Actions
      • Set TempPingLocSF = (Center of Silver Fall <gen>)
      • Cinematic - Ping minimap for HumanArmy at TempPingLocSF for 3.00 seconds, using a Simple ping of color (0.00%, 100.00%, 50.00%)
      • Wait 3.00 seconds
      • Custom script: call RemoveLocation(ugd_TempPingLocSF)
      • Visibility - Create an initially Enabled visibility modifier for Player 1 (Red) emitting Visibility across ShowLocSF <gen>
      • Set ShowSFLoc = (Last created visibility modifier)
      • Quest - Create a Required quest titled Investigate Silver ... with the description We haven't heard fr..., using icon path ReplaceableTextures\PassiveButtons\PASBTNPillage.blp
      • Set ScoutTown = (Last created quest)
      • Quest - Create a quest requirement for ScoutTown with the description Scout the town
      • Set ScoutTownReq = (Last created quest requirement)
      • Quest - Flash the quest dialog button
      • Quest - Display to HumanArmy the Quest Update message: |cFFFFD700Main Ques...
      • Wait 5.00 seconds
      • Quest - Display to HumanArmy the Hint message: |c00006400Hint:|r B...
      • Destructible - Destroy Gate (Vertical) 0252 <gen>
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in Arrival2SF <gen> owned by Player 3 (Teal)) and do (Unit Group - Add (Picked unit) to SFundeadforce)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in Silver Fall <gen> owned by Player 3 (Teal)) and do (Unit Group - Add (Picked unit) to SFundeadforce)
I am still using GUI and is just getting into these Custom Scripts.

ugd_TempPingLocSF
This is your problem. It should start with udg_
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
You should remove the location before the wait.

I don't see the need for a variable named TempPingLocSF. Why not name it TempLoc or TLoc instead. Easier to type. And you should use the same variable in other triggers, share variables between triggers as much as you can to cut down the amount of variables in your map.
 
Level 4
Joined
Jan 28, 2013
Messages
94
You should remove the location before the wait.

I don't see the need for a variable named TempPingLocSF. Why not name it TempLoc or TLoc instead. Easier to type. And you should use the same variable in other triggers, share variables between triggers as much as you can to cut down the amount of variables in your map.
Alright thanks!

I haven't been using my variables for more than one things before.
 
Status
Not open for further replies.
Top