Variable Question

slayer

New Member
Reaction score
2
Hi!
I have a question on the Custom script: call RemoveLocation (udg_TempDLocation) used in this trigger:

Tome Spawn
Events
Unit - A unit Sells an item (from shop)
Conditions
(Item-type of (Sold Item)) Equal to Sacred Tome START Q
Actions
Set TempDLocation = (Center of Tome Spawn Point <gen>)
Destructible - Resurrect Tome Pedestal 0795 <gen> with (Max life of (Last created destructible)) life and Show birth animation
Destructible - Resurrect Demonic Gate (Horizontal) 1692 <gen> with (Max life of (Last created destructible)) life and Show birth animation
Custom script: call RemoveLocation (udg_TempDLocation)


The trigger works perfectly, but when I check it in leak checker it says "Location variable has not been removed". Is leak checker reliable? Or could the "Location variable has not been removed" result in something undesirable?
Or is there any other way to improve the script?
 

Squishy

You can change this now in User CP.
Reaction score
127
You are removing the location properly, but why are you using one? You don't refer to the variable anywhere in your trigger.
 

slayer

New Member
Reaction score
2
You are removing the location properly, but why are you using one? You don't refer to the variable anywhere in your trigger.

I see, sorry I'm just a little bit confused, I'm a newbie trying to learn :)

So the trigger could (should?) look like this?
Or will it result in a leak? (If no, how do I know if it is made in the right way?)

Tome Spawn
Events
Unit - A unit Sells an item (from shop)
Conditions
(Item-type of (Sold Item)) Equal to Sacred Tome START Q
Actions
Destructible - Resurrect Tome Pedestal 0795 <gen> with (Max life of (Last created destructible)) life and Show birth animation
Destructible - Resurrect Demonic Gate (Horizontal) 1692 <gen> with (Max life of (Last created destructible)) life and Show birth animation
 

SFilip

Gone but not forgotten
Reaction score
634
> Is leak checker reliable?
No, especially if you're using an older version (latest being v3 found here).
However I strongly recommend reading a tutorial and cleaning up leaks on your own instead of fully relying on LeakCheck.
 

SFilip

Gone but not forgotten
Reaction score
634
> v3 does not work on my comp though
Getting any error? You might need the VB6 runtime.
Post in the LeakCheck thread and 56k might solve your problem.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top