How do i clear all an array.

Evote

New Member
Reaction score
4
I have an array with like 50 varables and i wana clear all them but clearing them all one by one is annoying and pisses me off anyway to clear all of them?
PHP:
call RemoveLocation(udg_Ultie[6])
like i want
PHP:
call RemoveLocation(udg_Ultie[all of them])
Any way to do that.
 
L

lordpredator

Guest
PSEUDO CODE:
for loop integer A 1 to 50 do actions
LOOP
call RemoveLocation(udg_Ultie[Integer A])
 

Evote

New Member
Reaction score
4
Thanks mate i gota ask one more think though
Code:
Sliding
    Events
        Time - Every 0.01 seconds of game time
        Unit - A unit Is issued an order targeting a point
    Conditions
    Actions
        Unit - Make (Triggering unit) face (Target point of issued order) over 0.00 seconds
        Unit Group - Pick every unit in All_Units and do (Set L[(Player number of (Owner of (Picked unit)))] = (Position of (Picked unit)))
        Unit Group - Pick every unit in All_Units and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                    Then - Actions
                        Animation - Change (Picked unit)'s animation speed to 200.00% of its original speed
                        Set L[(Player number of (Owner of (Picked unit)))] = (Position of (Picked unit))
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                And - All (Conditions) are true
                                    Conditions
                                        (Unit-type of (Picked unit)) Equal to Arrgh Shit My Head's on Fire.
                                        (Terrain type at L[(Player number of (Owner of (Picked unit)))]) Equal to Northrend - Snow
                            Then - Actions
                                Unit - Kill (Picked unit)
                            Else - Actions
                                Do nothing
                        Set SLIDE[(Player number of (Owner of (Picked unit)))] = (L[(Player number of (Owner of (Picked unit)))] offset by Frame_Rate[(Player number of (Owner of (Picked unit)))] towards (Facing of (Picked unit)) degrees)
                        If (((Unit-type of (Picked unit)) Equal to Arrgh Shit My Head's on Fire.) and ((Terrain type at L[(Player number of (Owner of (Picked unit)))]) Equal to Northrend - Ice)) then do (Unit - Move (Picked unit) instantly to SLIDE[(Player number of (Owner of (Picked unit)))]) else do (Do nothing)
                        For each (Integer A) from 1 to 12, do (Actions)
                            Loop - Actions
                                Custom script:   call RemoveLocation(udg_L[GetForLoopIndexA()])
                                Custom script:   call RemoveLocation(udg_SLIDE[GetForLoopIndexA()])
                    Else - Actions
                        Do nothing

Ok leak Check says that i haven't removed the varable L But i have i think?? how i fix?
 
L

lordpredator

Guest
well this code is confusing, made it with code tags to make readable... anyway... i see a lot of errors... for example:

1)
why do you have 2 "pick every unit" action of the same group... one with a single action and the other with multiple actions...
Code:
Unit Group - Pick every unit in All_Units and do (Set L[(Player number of (Owner of (Picked unit)))] = (Position of (Picked unit)))
Unit Group - Pick every unit in All_Units and do (Actions)
delete the first one... and set the location inside the loop of the second

2)
Code:
 If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Then - Actions
WTF this means?.... why you make a conditional without conditions???!

3)
Code:
 Set L[(Player number of (Owner of (Picked unit)))] = (Position of (Picked unit))
you repeat the set location inside the loop... so you are leaking twice... and making the trigger slower too...

4)
Code:
 If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
A conditional without conditions again??... anyway... the and for the condition is the default... so any condition you put in the condition part of the if... will be "and", you only have to use OR if you need a condition of that type.

5)
well i will finish there because the code without TABS is so confusing... maybe im wrong with some error...

LP
 

Evote

New Member
Reaction score
4
i need to remove the varable ay L but i have??
Btw the trigger speed does not lagg even a pentium 3 can easly do it without lagg pentium 1's can prosess fast enough but they carn't run warcraft.
Thanks m8

wow i really stuffed that one up it was an edit ... of my old one i added stuff forgot to remove so +rep :) for U

Leak Check Still Says i hapent removed the varable L.

Whats up with that?
 

Chocobo

White-Flower
Reaction score
409
i need to remove the varable ay L but i have??
Btw the trigger speed does not lagg even a pentium 3 can easly do it without lagg pentium 1's can prosess fast enough but they carn't run warcraft.
Thanks m8

wow i really stuffed that one up it was an edit ... of my old one i added stuff forgot to remove so +rep :) for U

Leak Check Still Says i hapent removed the varable L.

Whats up with that?

A reason for your problem : http://www.thehelper.net/forums/showthread.php?t=34380
 

Chocobo

White-Flower
Reaction score
409
which page??

Post 52 :

SFilip said:
> it was not made for the advanced mapper.
Yet it makes the people rely on it far too much.
"Its ok, this is 100% leakless, LeakCheck says so"
"This trigger is bad, LeakCheck says 'Location variable has not been removed'...well I trust it, I'll just create a new trigger"
If a bug suddenly comes up someone would think a trigger perhaps leaks. Someone might just think that a multiboard position leaks and even dump the trigger.

No, I'm not saying that its bad. Its great until you get the hang of leaks. But a lot of people continue using it even when they do.

> what are the other many reasons that make this program worthless?
The very fact that you would let a computer program judge something like this instead of you.

I'm sorry for demoting it like this, I'm aware it probably took a lot of work and time to make this.
And you might want to consider releasing the source since you stopped developing it. Someone might just want to take over...
 

Evote

New Member
Reaction score
4
humm btw all things remain stored in a game till the end thats what a leak is but some really stuff things up the game thats what the program checks for...
Dam soz double post
 

Chocobo

White-Flower
Reaction score
409
any way to fix that?

Code:
 Set SLIDE[(Player number of (Owner of (Picked unit)))] = (L[(Player number of (Owner of (Picked unit)))] offset by Frame_Rate[(Player number of (Owner of (Picked unit)))] towards (Facing of (Picked unit)) degrees)

put this instead :

Code:
set udg_SLIDE[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))] = Location(GetLocationX(udg_L[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))]) + udg_Frame_Rate[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))] * Cos(GetUnitFacing(GetEnumUnit())*3.14159/180.0) , GetLocationY(Location(udg_L[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))]) + udg_Frame_Rate[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))] * Sin(GetUnitFacing(GetEnumUnit())*3.14159/180.0)

does it work? No idea.

nvm, bracket ) errror. ignore the problem.
 

Evote

New Member
Reaction score
4
thanks for help but now world edit crashed lol i brb i try fix it.
i'll try build a calculater for it if that doesn't work.
 
L

lordpredator

Guest
polar offset makes a new point, so it leaks, but you can solve it simply by making a temp_point and then remove it. The array you can have it until the end of the match... but if at some moment you change a value of one of the index... you have to remove the old location first... if not it will leak.
 

Evote

New Member
Reaction score
4
lol thatnk but i already build a calculater it works extremely smooth i'd say better that polar escape.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    So what it really is me trying to implement some kind of better site navigation not change the whole theme of the site
  • Varine Varine:
    How can you tell the difference between real traffic and indexing or AI generation bots?
  • The Helper The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air
  • The Helper The Helper:
    New dessert added to recipes Southern Pecan Praline Cake https://www.thehelper.net/threads/recipe-southern-pecan-praline-cake.193555/
  • The Helper The Helper:
    Another bot invasion 493 members online most of them bots that do not show up on stats
  • Varine Varine:
    I'm looking at a solid 378 guests, but 3 members. Of which two are me and VSNES. The third is unlisted, which makes me think its a ghost.
    +1
  • The Helper The Helper:
    Some members choose invisibility mode
    +1
  • The Helper The Helper:
    I bitch about Xenforo sometimes but it really is full featured you just have to really know what you are doing to get the most out of it.
  • The Helper The Helper:
    It is just not easy to fix styles and customize but it definitely can be done
  • The Helper The Helper:
    I do know this - xenforo dropped the ball by not keeping the vbulletin reputation comments as a feature. The loss of the Reputation comments data when we switched to Xenforo really was the death knell for the site when it came to all the users that left. I know I missed it so much and I got way less interested in the site when that feature was gone and I run the site.
  • Blackveiled Blackveiled:
    People love rep, lol
    +1
  • The Helper The Helper:
    The recipe today is Sloppy Joe Casserole - one of my faves LOL https://www.thehelper.net/threads/sloppy-joe-casserole-with-manwich.193585/

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top