• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

player number array leak help

Status
Not open for further replies.
Level 7
Joined
Jun 15, 2010
Messages
218
Ok so im quite new to fix leaks, and im getting to understand it.
They only problem is

Flaming Shield
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Flaming Shield
Actions
For each (Integer A) from 1 to 15, do (Actions)
Loop - Actions
Wait 1.00 game-time seconds
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Life of (Triggering unit)) Less than 5.00
Then - Actions
Skip remaining actions
Else - Actions
Set TempLoc28[(Player number of (Owner of (Triggering unit)))] = (Position of (Triggering unit))
Set Unitgroup = (Units within 300.00 of TempLoc28[(Player number of (Owner of (Triggering unit)))] matching ((((Owner of (Matching unit)) is an enemy of (Triggering player)) Equal to True) and (((Matching unit) is alive) Equal to True)))
Custom script: call RemoveLocation (udg_TempLoc28[(Player number of (Owner of (Triggering unit)))]
Unit Group - Pick every unit in GroupVar7 and do (Actions)
Loop - Actions
Unit - Cause (Triggering unit) to damage (Picked unit), dealing (25.00 x (Real((Level of Flaming Shield for (Triggering unit))))) damage of attack type Spells and damage type Normal
Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Weapons\RedDragonBreath\RedDragonMissile.mdl
Special Effect - Destroy (Last created special effect)
Custom script: call DestroyGroup (udg_GroupVar7)
Unit - Remove Flaming Shield from (Triggering unit)


This trigger gives error becouse Custom script: call RemoveLocation (udg_TempLoc28[(Player number of (Owner of (Triggering unit)))] is wrong..

My question now is: Why is it wrong? how to fix leaks from variables with arrays linked to player number?
 
Last edited:
Status
Not open for further replies.
Top