Argentine
New Member
- Reaction score
- 2
My trigger is below.
The problem is i get this message "trigger disabled due to an error": Line 168 "Invalid type for specified operator."
The line it refers to is: Custom Script: exitwhen (GetItemTypeId(udg_tmpItem) == udg_spellItemId[udg_tmpInt])
Can someone check this out and help me figure out the issue? I have all the required integers and other triggers.
The problem is i get this message "trigger disabled due to an error": Line 168 "Invalid type for specified operator."
The line it refers to is: Custom Script: exitwhen (GetItemTypeId(udg_tmpItem) == udg_spellItemId[udg_tmpInt])
Can someone check this out and help me figure out the issue? I have all the required integers and other triggers.
Trigger:
- Hero Buys Spell
- Events
- Unit - A unit Sells an item (from shop)
- Conditions
- Actions
- Set tmpItem = (Sold Item)
- Set tmpUnit = (Buying unit)
- -------- Lets determine which spell was bought. --------
- For each (Integer A) from 0 to 3, do (Actions)
- Loop - Actions
- Set tmpInt = (Integer A)
- -------- Custom script to exit the loop when the right 'spell' was found. --------
- Custom script: exitwhen (GetItemTypeId(udg_tmpItem) == udg_spellItemId[udg_tmpInt])
- Loop - Actions
- -------- The right sold spells is found. --------
- -------- Now lets determine whether the buying hero already has this spells learnt or not. --------
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Level of realSpellId[tmpInt] for tmpUnit) Equal to 0
- Then - Actions
- -------- The hero does not have this spell. Lets 'learn' the spell. --------
- Unit - Add realSpellId[tmpInt] to tmpUnit
- Else - Actions
- -------- The hero has this spell. --------
- -------- We have to determine whether it's an one level ultimate or a regular spell. --------
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- realSpellId[tmpInt] Equal to Storm, Earth, And Fire
- Then - Actions
- -------- The spell was an ultimate. As it's a one level spell, we have to refund the gold. --------
- Player - Add 450 to (Owner of tmpUnit) Current gold
- Else - Actions
- -------- The spell was not an ultimate. --------
- -------- We have to determine whether the normal spell is maxed out or not. --------
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Level of realSpellId[tmpInt] for tmpUnit) Equal to 3
- Then - Actions
- -------- The spell is maxed out. Give gold back. --------
- Player - Add 150 to (Owner of tmpUnit) Current gold
- Else - Actions
- -------- The spell is not maxed out. Increase the level of the spell. --------
- Unit - Increase level of realSpellId[tmpInt] for tmpUnit
- If - Conditions
- If - Conditions
- If - Conditions
- Events