• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Removing leaks in Lua

Status
Not open for further replies.
Do you have another location variable named udg_PointVariable? In that case, just change it back to RemoveLocation(udg_Point). In case that still doesn't work, enclose the call within an xpcall function, which will help you determine if and what errors are occurring when using said function. The xpcall line should look like this: xpcall(RemoveLocation, print, udg_Point)
 
Creating and removing a global variable:
  • Set Variable TempPoint = (Center of map)
  • Custom script: RemoveLocation(udg_TempPoint)

Creating and removing a local variable:
  • Custom script: local TempPoint = Location(0, 0)
  • Custom script: RemoveLocation(TempPoint)

udg_ is a prefix that tells the code you're talking about a global variable.

Some useful links:
 
Last edited:
Thank you both for helping out.

I'll be more precise.
I made a Global Variable and then this triggers:

  • Set VariableSet Cinematic1WalkDemon = Cinematic1DemonMoveTo1 <gen>
  • Unit - Order Demon Hunter 0032 <gen> to Move To (Center of Cinematic1WalkDemon)
  • Wait 9.00 seconds
  • Custom script: RemoveLocation(udg_Cinematic1WalkDemon)

Ignores all triggers beneath:
  • Custom script: RemoveLocation(udg_Cinematic1WalkDemon)


Do you have another location variable named udg_PointVariable? In that case, just change it back to RemoveLocation(udg_Point). In case that still doesn't work, enclose the call within an xpcall function, which will help you determine if and what errors are occurring when using said function. The xpcall line should look like this: xpcall(RemoveLocation, print, udg_Point)

When I use
  • Custom script: xpcall(RemoveLocation, print, udg_Cinematic1WalkDemon)
I get:

screenshot_9-png.395679


I think I resolved the Issue by changing the Variable from Region to Point. I'll check back later.
Ye this solved the issue.
 

Attachments

  • Screenshot_9.png
    Screenshot_9.png
    1.1 MB · Views: 222
Last edited:
Yeah, Regions are not Points (locations). Your trigger should look like this:
  • Set Variable SomePoint = Center of Cinematic1WalkDemon <gen>
  • Unit - Order Demon Hunter 0032 <gen> to Move To SomePoint
  • Wait 9.00 seconds
  • Custom script: RemoveLocation(udg_SomePoint)

Your preplaced Regions can remain active throughout the entire game, you don't have to worry about removing or cleaning them up.
 
Status
Not open for further replies.
Back
Top