Avoid Memories leak

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

User avatar
weirdone2
Forum Staff
Posts: 926
Joined: June 3rd, 2007, 8:03 pm

Re: Avoid Memories leak

Post by weirdone2 »

initiald wrote:
weirdone2 wrote:
Weirdone, i really didn't use your codes. Netheir do I used JJ codes.
I hoped I could use them but those codes leak. So I used Aero's suggestion. And add somemore thing I needed.
Your -tele or Jj's -tele was using call location xy right? Since I don't wanna to use the removeLocation thingie I have to do it another way.
Pfft You're still using the concept. :P I don't really care much if you use my code as long as you don't try to pawn it off as your own idea/code. It's just something I mentioned since I saw you post it. :) Also as a note I don't know about jj's as I've never used it but my pack doesn't lag unless you do something dumb in it.
I said "I didn't use your codes" That's it. Btw, that's Aero's codes, and your idea. Please don't mix them up ok?
I give credits for using codes, not ideas. Since I can't really know where the source of all ideas.
Btw, this idea was already on Sg-Guys pack. By using the already existed command, changing it so something else. (it uses STOP), and the wtf blink idea was already on Xantan's pack for a long time.
So let's say thank you to all of you. Thanks Xantan, Sg guy and your idea.
But not codes. Codes belongs to Aero.
As I said, I was just mentioning it, I never did ask that you give me creds, I only said just that none should go off claiming it as their own, and you changed it anyhow so it's not like your still using my code, but sense you want to turn this personal then I'll give you some details. Personally I don't know about this sg guys pack, but I do believe mine was around before his, second of course everyone is going to think up of some teleporting cheat, who doesn't get annoyed when you move slow after all, I just happen to claim the patrol version of teleporting, which is why I said I still claim the idea. :) And you seem to be sourly mistaken about coding all aero has provided is the template or the skeleton of the project, no offense to aero I love the template, :) but that is all that it is a template to get you started the coding would still be done even without a premade skeleton design.
User avatar
Aero
Forum Staff
Posts: 829
Joined: January 28th, 2007, 8:10 pm
Title: JASS Programmer
Location: Canada

Re: Avoid Memories leak

Post by Aero »

Code: Select all

Function Anything takes nothing return boolean
if abc==cde then
return true
endif
endfunction
A map won't even run if there is no valid return value at the bottom.
It should not allow the game to be created from the Create Game menu.
I guess this is only for functions that return boolean?
User avatar
JJ2197
Legendary Genius
Posts: 1311
Joined: August 8th, 2007, 8:10 am
Title: Legendary Genius²
Location: St. George Utah

Re: Avoid Memories leak

Post by JJ2197 »

Should be this...

Code: Select all

function Anything takes nothing returns boolean
if abc==cde then
return true
else
return false
endif
endfunction
Other errors you made were F should be lower-cased and you said return rather then returns...
Computer Specs:
Motherboard: GA-990FXA-UD3
CPU: FX-8350 @ 4.0GHz
PSU: Corsair CX500
RAM: G.Skill Ripjaws X 8GB @ 1866
GPU: Radeon HD 4870 1GB
HDD: OCZ Vertex series 30GB SSD
Case: Antec 900
Monitor: Toshiba 32"
OS: Windows 7 Ultimate
User avatar
Aero
Forum Staff
Posts: 829
Joined: January 28th, 2007, 8:10 pm
Title: JASS Programmer
Location: Canada

Re: Avoid Memories leak

Post by Aero »

JJ2197 wrote:Should be this...

Code: Select all

function Anything takes nothing returns boolean
if abc==cde then
return true
else
return false
endif
endfunction
Other errors you made were F should be lower-cased and you said return rather then returns...
Dont mock me noob.
I copy-pasted that piece of code from initiald's post when he was trying to explain what he meant by "boolean error", and made comments on it.
Obviously I wouldn't post code like that.

Besides, your "fixed" code still isn't fixed.
With a custom function that returns a value, the last line before the endfunction must return the return type or the map won't (shouldn't) even run (due to scripting errors).
User avatar
JJ2197
Legendary Genius
Posts: 1311
Joined: August 8th, 2007, 8:10 am
Title: Legendary Genius²
Location: St. George Utah

Re: Avoid Memories leak

Post by JJ2197 »

haha... you gotta chill... mocking you... heh...

Anyways, I was just showing other errors really... Did you
really think that I thought you were stupid... haha?

Also it works just fine, just need to set globals or locals for abc cde...
Computer Specs:
Motherboard: GA-990FXA-UD3
CPU: FX-8350 @ 4.0GHz
PSU: Corsair CX500
RAM: G.Skill Ripjaws X 8GB @ 1866
GPU: Radeon HD 4870 1GB
HDD: OCZ Vertex series 30GB SSD
Case: Antec 900
Monitor: Toshiba 32"
OS: Windows 7 Ultimate
initialD
Some Honorary Title
Posts: 1713
Joined: June 8th, 2007, 5:08 am
Title: Angry Bird

Re: Avoid Memories leak

Post by initialD »

For Weirdone:
I was just saying that the codes job was done by me, I can claim the codes as mine.
You can claim the idea as yours, it's right. Just do not mix up both.
It's not just a change in the new pack. There are about part of codes on that commands.
2 parts of them were taken from Aero's codes
Other 4 parts was my codes I do the coding myself. (with detector and other things)
So let's make it as easier as this.

Aero can claim the codes as his.
I can claim the codes as mine.
You can claim the idea as yours.

One can have an idea about a cheat command yet other can do the codes.


For JJ's:
function Anything takes nothing returns boolean
if abc==cde then
return true
else
return false
endif
endfunction

yes, I made a mistake without the "s" for returns.
Yet when it reach the line "return" it will return, and stop doing whatever below the lines. Else if is not necessary.
So it should be like this

Code: Select all

Function Anything takes nothing returns boolean
if abc==cde then
return true
endif
return false
endfunction
Aero wrote:

Code: Select all

Function Anything takes nothing return boolean
if abc==cde then
return true
endif
endfunction
A map won't even run if there is no valid return value at the bottom.
It should not allow the game to be created from the Create Game menu.
I guess this is only for functions that return boolean?
hmm you are right.
actually it was

Code: Select all

Function Anything takes nothing return nothing
if abc==cde then
return true
endif
endfunction
And this function is then takens by a triggeraddaction(trigger,function Anything)
User avatar
Aero
Forum Staff
Posts: 829
Joined: January 28th, 2007, 8:10 pm
Title: JASS Programmer
Location: Canada

Re: Avoid Memories leak

Post by Aero »

JJ2197 wrote:haha... you gotta chill... mocking you... heh...

Anyways, I was just showing other errors really... Did you
really think that I thought you were stupid... haha?

Also it works just fine, just need to set globals or locals for abc cde...
What's the point of pointing out errors or flaws in mock examples?

(Don't worry about it lol I just felt in the mood to rip on someone)
initialD
Some Honorary Title
Posts: 1713
Joined: June 8th, 2007, 5:08 am
Title: Angry Bird

Re: Avoid Memories leak

Post by initialD »

Actually, the "s" error thingie was a typing error made by me.
And other errors were made purposely, to show Aero what I mean by saying "invalid returns"
JJ probably didn't read the previous posts.
So, whatever...
I have been used to it I don't really mind if someone didn't even understand my english.

Since I have no other question about memory leakings. This thread is locked.
For futher chat please meet us in the off-topic section.
Thanks.
lol
initialD
Some Honorary Title
Posts: 1713
Joined: June 8th, 2007, 5:08 am
Title: Angry Bird

Re: Avoid Memories leak

Post by initialD »

Aero wrote: When you display text to a player, it sucks up a little bit of memory permanently.
If that same string is re-displayed, no additional memory is sucked up.

If it's a different string, it sucks up even more memory.

Now, when I get back, I'll show you an awesome texttag system with trackable I have in mind.
hmm, I've just figured another way to see enemies' chat messages.
There is a way that we can change Blizzard default setting by changing the alliance state.
I believe, by changing the alliance state's message, the enemies chat strings will be shown to us as an allied message, using blizzard default chat system.
Of course, this cant be done by GUI. Yet JASS is possible.
I have seen something like that before, the enemy kept talking an his message shown as an allied message to me. (the creator made it so for other purpose, it's not a cheat.)
Yet I have no time to make some more tests on it. And because I am lazy.

This will fix the leaks, right?
What do you think? Aero.
User avatar
Aero
Forum Staff
Posts: 829
Joined: January 28th, 2007, 8:10 pm
Title: JASS Programmer
Location: Canada

Re: Avoid Memories leak

Post by Aero »

That sounds doable using this native:

Code: Select all

native SetPlayerAlliance        takes player sourcePlayer, player otherPlayer, alliancetype whichAllianceSetting, boolean value returns nothing
For alliancetype parameter, one or more of the following should do the trick:

Code: Select all

ALLIANCE_HELP_REQUEST
ALLIANCE_HELP_RESPONSE
ALLIANCE_PASSIVE
ALLIANCE_RESCUABLE
ALLIANCE_SHARED_ADVANCED_CONTROL
ALLIANCE_SHARED_CONTROL
ALLIANCE_SHARED_SPELLS
ALLIANCE_SHARED_VISION
ALLIANCE_SHARED_VISION_FORCED
ALLIANCE_SHARED_XP