HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

1.24 fix

08-14-2009, 08:03 PM#1
MaD[Lion]
im trying to fix old maps tat doesnt work iwth 1.24. I fixed the H2I and successfully saved the map, problem is when i select the map in the map list... it shows no player slots... got no idea why... anyone know a fix? or known issue?
08-14-2009, 08:08 PM#2
Cheezeman
I got the same problem.
It's caused because there's still a fragment of the return bug left.

Do a complete search of the map script after it, and remove it (as long as it's there, even if it isn't used, it will cause the bug)
08-14-2009, 08:23 PM#3
Alevice
update jasshelper.
08-14-2009, 08:34 PM#4
MaD[Lion]
its not jasshelper. i found the bug:
Collapse JASS:
    if (typeid=='h00G') then
        return AIUnitBuildMassExtractor(U)
    else
//		set X = GetUnitX(U)
//		set Y = GetUnitY(U)
//		set Offset = 256
//		set OffsetAngleStart = GetRandomReal(0,360)
//		set OffsetAngle = OffsetAngleStart
//		loop
//			set OffsetAngle = OffsetAngle + 45
//			set CheckX = X + Offset*Cos(OffsetAngle*bj_DEGTORAD)
//			set CheckY = Y + Offset*Sin(OffsetAngle*bj_DEGTORAD)
//			call MoveLocation(udg_tempLoc,CheckX,CheckY)
//			if GetLocationZ(udg_tempLoc)>udg_waterHeight and IssueBuildOrderById(U, typeid, CheckX, CheckY) then
//				return true
//			endif
//				if OffsetAngle>=OffsetAngleStart+360 then
//				set OffsetAngle = 0
//				set Offset = Offset + 128
//				if Offset>2048 then
//					return false
//				endif
//			endif
//		endloop
    endif
    return false

if i uncomment any of the lines, i get error with original compiler, and this is not newgen or vjass or anything. it seems something went wrong when blizzard fixed return shit
08-14-2009, 08:37 PM#5
Cheezeman
Oh, some dude told me about this thing.
I'm not sure EXACTLY how it worked, but if you have several returns in a script it won't compile.
Very strange, I wonder why blizzard made it so.

Maybe use some "Return_boolean" you set to true/false in your if's, and then in the end return.
Alternatively, you can also use a "Keep_on_checking" boolean, and wherever you have an if, you check it aswell (so that it won't keep on checking if's to change the Return_boolean)

-------- Edit --------
Maybe I should've explained that a bit more...

Collapse JASS:
local boolean return_boolean = false
local boolean keep_on_checking = true
//  [...]
    if (typeid=='h00G') then
        set return_boolean = AIUnitBuildMassExtractor(U)
        set keep_on_checking = false
    else
        set X = GetUnitX(U)
        set Y = GetUnitY(U)
        set Offset = 256
        set OffsetAngleStart = GetRandomReal(0,360)
        set OffsetAngle = OffsetAngleStart
        loop
            set OffsetAngle = OffsetAngle + 45
            set CheckX = X + Offset*Cos(OffsetAngle*bj_DEGTORAD)
            set CheckY = Y + Offset*Sin(OffsetAngle*bj_DEGTORAD)
            call MoveLocation(udg_tempLoc,CheckX,CheckY)
            if keep_on_checking and GetLocationZ(udg_tempLoc)>udg_waterHeight and IssueBuildOrderById(U, typeid, CheckX, CheckY) then
                set return_boolean = true
                set keep_on_checking = false
            endif
                if OffsetAngle>=OffsetAngleStart+360 then
                set OffsetAngle = 0
                set Offset = Offset + 128
                if keep_on_checking and Offset>2048 then
                    set return_boolean = false
                    //setting keep_on_checking to false here wouldn't be neccessary since
                    //it won't check anything else
                endif
            endif
        endloop
    endif
    return return_boolean
08-14-2009, 08:40 PM#6
Vexorian
Quote:
Originally Posted by Alevice
update jasshelper.
or get the patch from westfall, no. Stop bothering about fixing these things, update jasshelper or get the westfall patch.
08-15-2009, 02:04 PM#7
MaD[Lion]
problem is im trying to fix protected maps... so updating jasshelper wont help
08-15-2009, 05:00 PM#8
Toadcop
Quote:
problem is im trying to fix protected maps... so updating jasshelper wont help
why !? afaik it's possible to run jasshelper on the war3map.j (or ?)
08-15-2009, 05:02 PM#9
Alevice
exactly
fetch the war3map.j let jasshelper process it and then get it back the map.
08-15-2009, 07:26 PM#10
Vexorian
Quote:
Originally Posted by MaD[Lion]
problem is im trying to fix protected maps... so updating jasshelper wont help
there's no reason to do it for protected maps, as a fixed patch already exists and should become retail eventually...