wc3edit.net
https://forum.wc3edit.net/

Return Bug Finder
http://forum.wc3edit.net/useful-tools-f69/return-bug-finder-t20911-30.html
Page 4 of 5

Author:  undeadstorms [ June 9th, 2012, 10:59 pm ]
Post subject:  Re: Return Bug Finder

owner123 wrote:
Here's a sample of how to do it.

I'll take your first bug:

Code:
function s2i takes string s2s returns integer
return s2s
return 0
endfunction

So, you need to separate this into 2 functions.

So, in haxorico's example, you create a "fix" function, and an "origional" function. The original calls the fix, the fix contains one of the returns of the original

For yours, it would be:

Code:
function fix1 takes string s2s returns integer
return s2s
end function

Code:
function originalFunction takes string s2s returns integer
call fix1(s2s)
return s2s
end function


I think that should work! It'd be nice if one of the people who are good at JASS tells me if this is right though.


Right right, so how do I insert that into my j file ? :(

Author:  Bartimaeus [ June 9th, 2012, 11:13 pm ]
Post subject:  Re: Return Bug Finder

Uh, by the way, I'm still getting that same error, even with the newest upload. o.o

Author:  undeadstorms [ June 9th, 2012, 11:26 pm ]
Post subject:  Re: Return Bug Finder

Bartimaeus wrote:
Uh, by the way, I'm still getting that same error, even with the newest upload. o.o


Same here.

Author:  owner123 [ June 10th, 2012, 1:44 am ]
Post subject:  Re: Return Bug Finder

Now that uploaded one works fine for me. I even re-downloaded it to try.

Anyways, I'm in the process of re-writing the whole thing cause my code is epic sloppy.. I should have it done in a few hours to a day.

(edit) Are you guys on 32 bit or 64 bit?

Author:  haxorico [ June 10th, 2012, 3:21 am ]
Post subject:  Re: Return Bug Finder

Haxorizer has a return bug finder, I can give you that part of the source to make it save time for you.
Also from my expirience, the method I am using, is not working all that well.
I think I made like 50 fix functions for NotD and it didn't do what it needed.
In any case, I think I figured out what it does, mainly its a way to convert variables.

function h2i takes handle h returns integer
return h
return 0
endfunction

will convert h to an integer for some reason. At patch 1.24, extra native functions were added to make this convertations, for the above example, a fix would be

function h2i takes handle i returns integer
return GetHandleID(h)
endfunction

or for your example

function exampleFunctions takes string s returns integer
return S2I(s) //this converts string to integer
endfunction

Same goes for units or any other thing. - Still I cannot confirm that to be 100% positive.

Author:  undeadstorms [ June 10th, 2012, 5:52 am ]
Post subject:  Re: Return Bug Finder

haxorico wrote:
Haxorizer has a return bug finder, I can give you that part of the source to make it save time for you.
Also from my expirience, the method I am using, is not working all that well.
I think I made like 50 fix functions for NotD and it didn't do what it needed.
In any case, I think I figured out what it does, mainly its a way to convert variables.

function h2i takes handle h returns integer
return h
return 0
endfunction

will convert h to an integer for some reason. At patch 1.24, extra native functions were added to make this convertations, for the above example, a fix would be

function h2i takes handle i returns integer
return GetHandleID(h)
endfunction

or for your example

function exampleFunctions takes string s returns integer
return S2I(s) //this converts string to integer
endfunction

Same goes for units or any other thing. - Still I cannot confirm that to be 100% positive.


Ok if you could send that part of haxorizer that can fix my return bugs, I would be most greatful :) thank you!

Author:  Bartimaeus [ June 10th, 2012, 10:17 am ]
Post subject:  Re: Return Bug Finder

I am on 64bit, and so is Undeadstorms.

Author:  owner123 [ June 10th, 2012, 1:53 pm ]
Post subject:  Re: Return Bug Finder

Hmm.. That explains it. I haven't converted it to x64 yet. I'll do that when I release the next

(edit)

As it's in Haxorizer.. Just use the one in haxorizer if you want a return-bug checker. :P.

Author:  undeadstorms [ June 10th, 2012, 10:09 pm ]
Post subject:  Re: Return Bug Finder

owner123 wrote:
Hmm.. That explains it. I haven't converted it to x64 yet. I'll do that when I release the next

(edit)

As it's in Haxorizer.. Just use the one in haxorizer if you want a return-bug checker. :P.


I would but you have to pay 5$ for that program and I don't want to pay unless I have a guarantee it is going to work, so I'm asking him if he can just send me the bug fixer part :)

Author:  Bartimaeus [ June 10th, 2012, 10:32 pm ]
Post subject:  Re: Return Bug Finder

owner123 wrote:
As it's in Haxorizer.. Just use the one in haxorizer if you want a return-bug checker. :P.


...which is also only a 32bit program, at least currently...unless Haxorico has fixed it. lol

Page 4 of 5 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/