Tutorial How To Convert To 1.24

quraji

zap
Reaction score
144
JASS newbie here,
so if i have:
I2S, S2I , I2H
its ok?

Okay, well first I2S and S2I are native blizzard functions, so yes, it's okay if you have them :p

As for I2H change it to:
JASS:

function I2H takes integer i returns handle
    return i
    call DoNothing()
    return null
endfunction

That should work. Although some people will tell you not to use I2H for different reasons :p
 

Flare

Stops copies me!
Reaction score
662
JASS:
private function hai takes integer hello returns integer
    if hello == 10 then
        return 100
    elseif hello == 100 then
         return 10
    endif
endfunction

should become
JASS:
private function hai takes integer hello returns integer
  if hello == 10 then
    return 100
  endif

  if hello == 100 then
    return 10
  endif
endfunction

if I correctly understand what the problem is caused by =p
 

cleeezzz

The Undead Ranger.
Reaction score
268
but you dont need to convert that, theres a return in both the if and the elseif
 

duckne55

New Member
Reaction score
2
moar help needed lol

thanks!
now i just need to change this:
JASS:
function blah takes integer a, integer b returns integer
  if a < 0 then
    if b < 0 then
      return blah (some stuff here)
    else
      return blah (some stuff here)
    endif
  else
    if b < 0 then
      return blah (some stuff here)
    else
      return blah (some stuff here)
    endif
  endif
endfunction

and do i need to do anythng about gamecache stuff?
 

Romek

Super Moderator
Reaction score
963
Try this:
JASS:
function blah takes integer a, integer b returns integer
  if a < 0 then
    if b < 0 then
      return blah (some stuff here) 
    endif
    return blah (some stuff here) 
  endif
  if b < 0 then
    return blah (some stuff here) 
  endif
  return blah (some stuff here)
endfunction
 

Sevion

The DIY Ninja
Reaction score
413
gamecache stuff should be changed to be used with hashtables. They're much faster and just better in general.

By the way, why are you calling a function that will always result in calling itself.

If all of that evaluates false, then it will ultimately end up calling itself in the else of b<0.

You have an infinite loop there ;o

All I have to do is call blah(0,0). Heck, even call blah(1,1) would crash.
 

duckne55

New Member
Reaction score
2
thanks again, but i thought it should be more like:
JASS:
function blah takes integer a, integer b returns integer
  if a &lt; 0 then
    if b &lt; 0 then
      return blah (something)
    endif
    return blah (something)
  endif
  if a &gt; 0 then
    if b &lt; 0 then
      return blah (something)
    endif
    return blah (something)
  endif
endfunction

and its not my map, its an unprotected one (note: i did not hack it), its a long story, thats y its gamecache.
 

Romek

Super Moderator
Reaction score
963
> thanks again, but i thought it should be more like:
They do exactly the same thing.

> and its not my map, its an unprotected one (note: i did not hack it), its a long story, thats y its gamecache.
I'd refrain from mentioning that if I were you. :rolleyes:
 

Wicelo

New Member
Reaction score
1
>Local Globals

Using local globals will now cause the map to be incompatible with 1.24.

That means no more abomination code.

You're going to have to find a way to do MUI another way (with code that goes over time that is)

Any code that runs instantly will automatically be MUI.

------------------
What exactly does that mean?
 

13lade619

is now a game developer :)
Reaction score
399
what's all the talk about the new 1.24b!?
did it really break the double return fixed with DoNothing?

i need explanationz... nao.. *sorry* :p.

EDIT:

We’ve released Patch 1.24b on PTR (Westfall) for testing, before the actual public live.

—————————————————————————————————————
Patch 1.24b
—————————————————————————————————————

PC WORLD EDITOR CHANGES

- Increased max map file size from 4 MB to 8 MB.
- Added the ability to store hashtable handles in a hashtable.
- Added GetSpellTargetX and GetSpellTargetY natives.
- Added a new base handle type “Agent” of which many types now extend from.
- Added a SaveAgentHandle native which can be used for saving most handle types.
- Added a JASS optimization dealing with global variable change events.

FIXES

- Fixed a few false positives caused by the “return bug” fix.
- Fixed a crash related to hashtable reference counting.
- “Shadowing” global variables with local variables no longer is possible.
- Fixed a type conversion dealing with operators (i.e. adding a handle with an integer).

srsly... wtf BLIZZ?? are you trying to ruin wc3?
 

BlackRose

Forum User
Reaction score
239
Um. Adding DoNothing() between the 2 returns doesn't work? At least for the latest JassHelper it doesn't?
 

Azlier

Old World Ghost
Reaction score
461
Not in 1.24b. Have fun fixing everything, guys. My stuff doesn't need repair ;).
 

Igor_Z

You can change this now in User CP.
Reaction score
61
Hmm, 1.24.1.6374 or 1.24b patch is just temporary... Its not a final patch, so I suggest you don't convert until they release more stable patch. Here is what they say about 1.24b patch.
- This BETA patch is for English-language version of the game WarCraft III: The Frozen Throne, however if you have the Spanish version can be installed, but keep in mind that part of the game changed to English language and can create conflict.

- Before you upgrade make a BACKUP of the entire game, so avoid having to install it again when you want to return to version 1.24a.

- You must have the game Warcraft III: The Frozen Throne 1.24a version before installing the patch 1.24b BETA.

- If you play DotA Alltars, patch 1.24b is compatible with the DotA Allstars map 6.62 BETA.
Read here for more info
 

saw792

Is known to say things. That is all.
Reaction score
280
Yes... the Beta patch was Beta. In case you havent noticed, 1.24b has been released across all servers and is NOT a beta.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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