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

Variable custom script Problem

Status
Not open for further replies.
Level 15
Joined
Jan 12, 2011
Messages
1,197
Hi everyone,

I am making a trigger, where I order a unit to move to a region. And to prevent leaks, I use a custom script to destroy it:

call RemoveLocation(udg_tempPoint)

  • Set tempPoint = IllidanCinematicPoint <gen>
  • Unit - Order Illidan (Demon Form) 0019 <gen> to Move To (Center of IllidanCinematicPoint <gen>)
  • Custom script: call RemoveLocation(udg_tempPoint)
However, when I save my map, I get an error called the trigger is disabled a function name, and also a script error. I do not know why, since I set the tempPoint variable to Region, and with no array. Should it have array?

There are also some other cinematic actions in this trigger, does the order change anything?

I appreciate your help.
 
Level 15
Joined
Jan 12, 2011
Messages
1,197
Yes, thanks, i wrote it wrong in the thread, now I have corrected it. However, it still does not works, it shows me: Invaild argument type (rect)

The picture shows how the whole trigger looks like.
 

Attachments

  • Variablebug.png
    Variablebug.png
    334.7 KB · Views: 77
Level 16
Joined
Sep 29, 2008
Messages
366
Yes, thanks, i wrote it wrong in the thread, now I have corrected it. However, it still does not works, it shows me: Invaild argument type (rect)

The picture shows how the whole trigger looks like.

yeah, you are storing a "rect" value into a "location" variable.

use

  • Set tempPoint = Center of IllidanCinematicPoint <gen>
    • Unit - Order Illidan (Demon Form) 0019 <gen> to Move To (tempPoint)
    • Custom script: call RemoveLocation(udg_tempPoint)
 
Level 12
Joined
May 22, 2015
Messages
1,051
Thanks, but it still does not work. I can't use move to tempPoint without the Center of prefix.
Your variable is of type "Region". This is the wrong type. You don't want to remove this region, either, most likely. You should change that variable to be of type "Point". Then set the variable to be "Center of (IllidanCinematicPoint <gen>)". Then you should be able to remove it properly.
 
Level 15
Joined
Jan 12, 2011
Messages
1,197
Your variable is of type "Region". This is the wrong type. You don't want to remove this region, either, most likely. You should change that variable to be of type "Point". Then set the variable to be "Center of (IllidanCinematicPoint <gen>)". Then you should be able to remove it properly.

Thank you very much, now it is working with no problem. :)
 
Status
Not open for further replies.
Top