Im starting to learn about memory leaks and iw ish to go back into my map and fix a few leaks, and I have a question.
I used the memopry leak dector and I found that a comman trigger of mine generates leaks, heres the trigger:
(Line: 12 ) (Word: 10 ) Position Leak
Unit - Create 1 Wriggler for Neutral Hostile at (Random point in Region 009 <gen>) facing Default building facing degrees
Unit - Create 1 Wriggler for Neutral Hostile at ^Leak
(Suggested fix) Set L = (Random point in Region 009 <gen>) facing Default building facing degrees
(Suggested fix) Custom Script: Call RemoveLocation(udg_L)
So im trying to use the custom script, but it doesn’t work, when I puit Custom Script: Call RemoveLocation(udg_L) at the end. So could someone explain how this works, thanks.
Is the (udg_L) part the region or the variable being used. My overall trigger looks like this now and doest work
spawn corpese arena
Events
Time - Every 60.00 seconds of game time
Conditions
Actions
Set duelareanaspawn = Region 387 <gen>
Unit - Create a Town Guard corpse for Neutral Hostile at (Random point in Region 387 <gen>)
Unit - Create a Town Guard corpse for Neutral Hostile at (Random point in Region 387 <gen>)
Unit - Create a Town Guard corpse for Neutral Hostile at (Random point in Region 387 <gen>)
Unit - Create a Town Guard corpse for Neutral Hostile at (Random point in Region 387 <gen>)
Unit - Create a Town Guard corpse for Neutral Hostile at (Random point in Region 387 <gen>)
Unit - Create a Town Guard corpse for Neutral Hostile at (Random point in Region 387 <gen>)
Custom script: Call RemoveLocation(duelarenaspawn)
I used the memopry leak dector and I found that a comman trigger of mine generates leaks, heres the trigger:
(Line: 12 ) (Word: 10 ) Position Leak
Unit - Create 1 Wriggler for Neutral Hostile at (Random point in Region 009 <gen>) facing Default building facing degrees
Unit - Create 1 Wriggler for Neutral Hostile at ^Leak
(Suggested fix) Set L = (Random point in Region 009 <gen>) facing Default building facing degrees
(Suggested fix) Custom Script: Call RemoveLocation(udg_L)
So im trying to use the custom script, but it doesn’t work, when I puit Custom Script: Call RemoveLocation(udg_L) at the end. So could someone explain how this works, thanks.
Is the (udg_L) part the region or the variable being used. My overall trigger looks like this now and doest work
spawn corpese arena
Events
Time - Every 60.00 seconds of game time
Conditions
Actions
Set duelareanaspawn = Region 387 <gen>
Unit - Create a Town Guard corpse for Neutral Hostile at (Random point in Region 387 <gen>)
Unit - Create a Town Guard corpse for Neutral Hostile at (Random point in Region 387 <gen>)
Unit - Create a Town Guard corpse for Neutral Hostile at (Random point in Region 387 <gen>)
Unit - Create a Town Guard corpse for Neutral Hostile at (Random point in Region 387 <gen>)
Unit - Create a Town Guard corpse for Neutral Hostile at (Random point in Region 387 <gen>)
Unit - Create a Town Guard corpse for Neutral Hostile at (Random point in Region 387 <gen>)
Custom script: Call RemoveLocation(duelarenaspawn)