Help with a leak

Status
Not open for further replies.
Well, you're leaking point locations on trigger "Teleport" and "Teleport 2".

How to Fix
1. Set (Point-type Variable) = (Point of a Location) on each of the trigger
EX: Set TempPoint[0] = Center of Region <gen>

2. Add in to each of the trigger, if it has variable, Custom Script: call RemoveLocation(udg_[Insert Point Variable's name[If any Array Numbers are used])

EX: Custom Script: call RemoveLocation(udg_TempPoint[0])
 

Attachments

  • Teleporttrigger.JPG
    Teleporttrigger.JPG
    46.2 KB · Views: 149
  • Teleporttrigger2.JPG
    Teleporttrigger2.JPG
    46.6 KB · Views: 159
Hey
thanx
But i did the fixes but the we wont save dosnt like the fix

This is what i got
  • Teleport 2
    • Events
      • Unit - A unit enters Teleport 07 <gen>
      • Unit - A unit enters Teleport 08 <gen>
      • Unit - A unit enters Teleport 09 <gen>
      • Unit - A unit enters Teleport 10 <gen>
      • Unit - A unit enters Teleport 11 <gen>
      • Unit - A unit enters Teleport 12 <gen>
      • Unit - A unit enters Teleport 14 <gen>
    • Conditions
    • Actions
      • Set Temp_Point[1] = Teleport 15 <gen>
      • Unit - Move (Triggering unit) instantly to Teleport2
      • Custom script: call RemoveLocation(udg_Temp_Point[1])
      • Set LeakFixed = (Position of Defend the Warlord 0034 <gen>)
      • If (((Triggering unit) is A peon-type unit) Equal to False) then do (Unit - Order (Triggering unit) to Attack-Move To LeakFixed) else do (Do nothing)
      • Custom script: call RemoveLocation(udg_LeakFixed)
and

  • Teleport
    • Events
      • Unit - A unit enters Teleport 01 <gen>
      • Unit - A unit enters Teleport 02 <gen>
      • Unit - A unit enters Teleport 03 <gen>
      • Unit - A unit enters Teleport 04 <gen>
      • Unit - A unit enters Teleport 05 <gen>
      • Unit - A unit enters Teleport 06 <gen>
      • Unit - A unit enters Teleport 13 <gen>
    • Conditions
    • Actions
      • Set Temp_Point[0] = Teleport 16 <gen>
      • Unit - Move (Triggering unit) instantly to Teleport1
      • Custom script: call RemoveLocation(udg_Temp_Point[0])
      • Set LeakFixed = (Position of Defend the King 0021 <gen>)
      • If (((Triggering unit) is A peon-type unit) Equal to False) then do (Unit - Order (Triggering unit) to Attack-Move To LeakFixed) else do (Do nothing)
      • Custom script: call RemoveLocation(udg_LeakFixed)
 
Last edited:
I did the same way you did except there is no two point-type variables in the triggers. I just used one with an array and haven't got an error from saving. See below:

  • Teleport
    • Events
      • Unit - A unit enters Teleport 01 <gen>
      • Unit - A unit enters Teleport 02 <gen>
      • Unit - A unit enters Teleport 03 <gen>
      • Unit - A unit enters Teleport 04 <gen>
      • Unit - A unit enters Teleport 05 <gen>
      • Unit - A unit enters Teleport 06 <gen>
      • Unit - A unit enters Teleport 13 <gen>
    • Conditions
    • Actions
      • Set TempPoint[0] = (Center of Teleport 16 <gen>)
      • Unit - Move (Triggering unit) instantly to TempPoint[0]
      • Custom script: call RemoveLocation(udg_TempPoint[0])
      • Set TempPoint[1] = (Position of Defend the King 0021 <gen>)
      • If (((Triggering unit) is A peon-type unit) Equal to False) then do (Unit - Order (Triggering unit) to Attack-Move To TempPoint[1]) else do (Do nothing)
      • Custom script: call RemoveLocation(udg_TempPoint[1])
  • Teleport 2
    • Events
      • Unit - A unit enters Teleport 07 <gen>
      • Unit - A unit enters Teleport 08 <gen>
      • Unit - A unit enters Teleport 09 <gen>
      • Unit - A unit enters Teleport 10 <gen>
      • Unit - A unit enters Teleport 11 <gen>
      • Unit - A unit enters Teleport 12 <gen>
      • Unit - A unit enters Teleport 14 <gen>
    • Conditions
    • Actions
      • Set TempPoint[0] = (Center of Teleport 15 <gen>)
      • Unit - Move (Triggering unit) instantly to (Center of Teleport 15 <gen>)
      • Custom script: call RemoveLocation(udg_TempPoint[0])
      • Set TempPoint[1] = (Position of Defend the Warlord 0034 <gen>)
      • If (((Triggering unit) is A peon-type unit) Equal to False) then do (Unit - Order (Triggering unit) to Attack-Move To (Position of Defend the Warlord 0034 <gen>)) else do (Do nothing)
      • Custom script: call RemoveLocation(udg_TempPoint[1])
Note: The RemoveLocation custom script removes the value of a point-type variable.
 
I can only get this i cant getit to look like yours...
  • Teleport
    • Events
      • Unit - A unit enters Teleport 01 <gen>
      • Unit - A unit enters Teleport 02 <gen>
      • Unit - A unit enters Teleport 03 <gen>
      • Unit - A unit enters Teleport 04 <gen>
      • Unit - A unit enters Teleport 05 <gen>
      • Unit - A unit enters Teleport 06 <gen>
      • Unit - A unit enters Teleport 13 <gen>
    • Conditions
    • Actions
      • Set Temp_Point[0] = (Center of Teleport 16 <gen>)
      • Unit - Move (Triggering unit) instantly to (Center of Teleport 16 <gen>)
      • Custom script: call RemoveLocation(udg_Temp_Point[0])
      • Set Temp_Point[1] = (Position of Defend the King 0021 <gen>)
      • If (((Triggering unit) is A peon-type unit) Equal to False) then do (Unit - Order (Triggering unit) to Attack Defend the King 0021 <gen>) else do (Do nothing)
      • Custom script: call RemoveLocation(udg_Temp_Point[1])
 
@ace992: I think you wanted the fifth line of each trigger to be this:

  • If (((Triggering unit) is A peon-type unit) Equal to False) then do (Unit - Order (Triggering unit) to Attack-Move To Temp_Point[1]) else do (Do nothing)
Instead of something like this:

  • If (((Triggering unit) is A peon-type unit) Equal to False) then do (Unit - Order (Triggering unit) to Attack Defend the King 0021 <gen>) else do (Do nothing)
Right?
 
Ok i think i have fixed it
leak check says that no leaks
  • Teleport 2
    • Events
      • Unit - A unit enters Teleport 07 <gen>
      • Unit - A unit enters Teleport 08 <gen>
      • Unit - A unit enters Teleport 09 <gen>
      • Unit - A unit enters Teleport 10 <gen>
      • Unit - A unit enters Teleport 11 <gen>
      • Unit - A unit enters Teleport 12 <gen>
      • Unit - A unit enters Teleport 14 <gen>
    • Conditions
    • Actions
      • Set Temp_Point[0] = (Center of Teleport 15 <gen>)
      • Unit - Move (Triggering unit) instantly to Temp_Point[0]
      • Custom script: call RemoveLocation(udg_Temp_Point[0])
      • Set Temp_Point[1] = (Position of Defend the Warlord 0034 <gen>)
      • If (((Triggering unit) is A peon-type unit) Equal to False) then do (Unit - Order (Triggering unit) to Attack Defend the Warlord 0034 <gen>) else do (Do nothing)
      • Custom script: call RemoveLocation(udg_Temp_Point[1])
  • Teleport
    • Events
      • Unit - A unit enters Teleport 01 <gen>
      • Unit - A unit enters Teleport 02 <gen>
      • Unit - A unit enters Teleport 03 <gen>
      • Unit - A unit enters Teleport 04 <gen>
      • Unit - A unit enters Teleport 05 <gen>
      • Unit - A unit enters Teleport 06 <gen>
      • Unit - A unit enters Teleport 13 <gen>
    • Conditions
    • Actions
      • Set Temp_Point[0] = (Center of Teleport 16 <gen>)
      • Unit - Move (Triggering unit) instantly to Temp_Point[0]
      • Custom script: call RemoveLocation(udg_Temp_Point[0])
      • Set Temp_Point[1] = (Position of Defend the King 0021 <gen>)
      • If (((Triggering unit) is A peon-type unit) Equal to False) then do (Unit - Order (Triggering unit) to Attack Defend the King 0021 <gen>) else do (Do nothing)
      • Custom script: call RemoveLocation(udg_Temp_Point[1])
So is this right?
 
No, it's still leaking a little. On the fifth line (please refer to my last post above), change Unit - Order (Triggering Unit) to Attack part to Unit - Order (Triggering Unit) to Attack Move. When that's done, you're all set to go unless there are any other problems/questions. :)
 
You want those guys being transported to the area to fight their way to the other side yes? If so, then on the "Then" part, change Unit - Issue Order Targeting A Unit to Unit - Issue Order Targeting A Point. I think you know how to do the rest from there. Otherwise if not, then just delete the Set TempPoint[1] and the Custom Script for it.
 
ok got it now will post the trigger in a min

  • Teleport
    • Events
      • Unit - A unit enters Teleport 01 <gen>
      • Unit - A unit enters Teleport 02 <gen>
      • Unit - A unit enters Teleport 03 <gen>
      • Unit - A unit enters Teleport 04 <gen>
      • Unit - A unit enters Teleport 05 <gen>
      • Unit - A unit enters Teleport 06 <gen>
      • Unit - A unit enters Teleport 13 <gen>
    • Conditions
    • Actions
      • Set Temp_Point[0] = (Center of Teleport 16 <gen>)
      • Unit - Move (Triggering unit) instantly to Temp_Point[0]
      • Custom script: call RemoveLocation(udg_Temp_Point[0])
      • Set Temp_Point[1] = (Position of Defend the King 0021 <gen>)
      • If (((Triggering unit) is A peon-type unit) Equal to False) then do (Unit - Order (Triggering unit) to Attack-Move To Temp_Point[1]) else do (Do nothing)
      • Custom script: call RemoveLocation(udg_Temp_Point[1])
  • Teleport 2
    • Events
      • Unit - A unit enters Teleport 07 <gen>
      • Unit - A unit enters Teleport 08 <gen>
      • Unit - A unit enters Teleport 09 <gen>
      • Unit - A unit enters Teleport 10 <gen>
      • Unit - A unit enters Teleport 11 <gen>
      • Unit - A unit enters Teleport 12 <gen>
      • Unit - A unit enters Teleport 14 <gen>
    • Conditions
    • Actions
      • Set Temp_Point[0] = (Center of Teleport 15 <gen>)
      • Unit - Move (Triggering unit) instantly to Temp_Point[0]
      • Custom script: call RemoveLocation(udg_Temp_Point[0])
      • Set Temp_Point[1] = (Position of Defend the Warlord 0034 <gen>)
      • If (((Triggering unit) is A peon-type unit) Equal to False) then do (Unit - Order (Triggering unit) to Attack-Move To Temp_Point[1]) else do (Do nothing)
      • Custom script: call RemoveLocation(udg_Temp_Point[1])
 
Did anything happen before the memory crash occurred? Unit transported to another area, triggered spells, special effects, trigger command, opening/closing gates, etc. etc.?
 
Augh, sorry, I can't find the source of the memory crash. :/ Try again and see if it doesn't happen again.
 
Status
Not open for further replies.
Back
Top