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

Crash on increasing an integer variable

Status
Not open for further replies.
Hi. I'm having a problem with three triggers. They are all similar so i will only post one on here, but whenever it is triggered, the game crashes! What is the problem?
It's supposed to add 50 to an integer but it doesn't! It just crashes instantly as soon as you buy the item (auto-use)
  • UpDist
    • Events
      • Unit - A unit Uses an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Upgrade Distance
    • Actions
      • Set TPlayer = (Owner of (Triggering unit))
      • Set Distance[(Player number of TPlayer)] = (Distance[(Player number of TPlayer)] + 50)
      • Game - Display to (All players) the text: Distance upgraded!
      • Set Score[(Player number of TPlayer)] = (Score[(Player number of TPlayer)] + 5)
I've already tried it with (Hero manipulating item) but it doesn't work.
I think it's because the unit isn't a hero, as yayafosho said. I guess i'll have to remake the whole triggers for the map...
Will get back to you and post the info
 
Level 4
Joined
Jun 1, 2007
Messages
92
If the unit using the item isn't a hero and it uses a tome, most likely the game would crash, other then that, I don't see a problem with the trigger.
 
Status
Not open for further replies.
Top