JustANewbie wrote:
haxorico wrote:
Not true. I managed to fix several maps. I cant promise a 100% restore. But it is do-able and not that hard to be honest.
That means you still have to do it manually, which is actually quite hard for me, since i just learned to edit warcraft III map when version 1.24, so i actually don't really understand what is return bug. Perhaps you could explain more to me
Code:
function thisIsABug takes handle h returns integer
return h
return 0
endfunction
This is the return bug. From what I gather, this double return function was served as a way to convert data types. In this example, it will convert a handle to an integer.
On the new version, JASS decided that a function can only return one value, instead of two (or how many there were) so this function would NOT work.
The way to get around it, is to manually convert the datatype yourself. For the example above.
Code:
function thisIsABug takes handle h returns integer
return GetHandleId(h)
endfunction
GetHandleId converts the handle given to an integer value of sorts... Same way the function I2S convertes Integer to String. R2I is Real to integer, etc...