• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Some questions about leaks/lags and control lost

Status
Not open for further replies.
Level 5
Joined
Aug 30, 2009
Messages
114
Well... I have some questions to do...

Leaks:

Integer, Real or Unit LOCAL variable leak? How to fix?
Floating Text leaks even if you set lifetime? How to fix without destroying it instantly
Moving a dummy unit every 0.03 seconds through local variables leaks? Even if I've destroyed it?
Wich hidden things leaks? I know a lot, but my map still have lag. And I don't have a lot of units or effects into it.


Lags:

Wich things can cause in-game lag? I did pré-loads, I cleaned every leak I know, and even I get a lot of lag while playing ONLINE only, but is not the host, I'm sure!

Control Lost:

I'm in trouble with players online, because they usually loose the control over their heroes... I don't know what is causing it, I GUESS it is caused by the 0.03 seconds spells, but I'm not sure! I really need help, really.

Here is my map for you to take a look.
http://epicwar.com/maps/147455/

I will give the unprotected map only for people who I have seen before in other help posts of Hive.

I know a lot about JASS, I'm learning vJASS now, but I didn't have used it in this map yet.
 
Level 14
Joined
Nov 18, 2007
Messages
1,084
Basically:
JASS:
local unit u // This alone does not leak. You don't need to set it to null later.
local unit u2 = CreateUnit(...) // This will leak if you don't null it.
...
// Fixing leaks:
set u2 = null
You wouldn't need to do this:
JASS:
local integer i = 21321321321
...
set i = 0 // No point because integers don't leak.
In the case of globals, there's no need for them to be nulled since their value will most likely get overridden if they get used again.
 
Level 5
Joined
Aug 30, 2009
Messages
114
Well, if you play my map, you'll see that I know how to deal with Jass, but lag and control lost are screwing my map! I'm desperated! I really need help!

Well, maybe it can be because I didn't fix some old leaks, I will do it now... thank you.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
You want to clean the leaks in GUI ?
This is how unit leaks are cleaned
  • Actions
    • Unit - Create 1 Unit for Player 1 (Red) at (Somewhere) facing Default building facing degrees
    • Custom script: call RemoveLocation(udg_Somewhere)
"Somewhere" is a variable, which will be cleaned by Custom Script

Further Infos:
call DestroyGroup(udg_<variable>) is for cleaning Unit Group leaks
set bj_wantDestroyGroup = true, is for cleaning Unit Group leaks too
call RemoveRect(udg_<variable>) is for cleaning Region leaks
call DestroyForce is for... I forgot >.<
  • Special Effect - Destroy (Last created special effect)
Creating a Special Effect leaks too, therefore it should be cleaned, but it can be cleaned by using non-custom script because it is already has its own user-friendly leaks cleaner
 
Status
Not open for further replies.
Top