Getting Game Version

Aizen

New Member
Reaction score
0
So basically, because of Blizzard's new patch, some maps have to be fixed. I have to fix my map, good thing it's just one system. (TimerUtils) For my map, I wanted it to be played by people with both versions of Warcraft. I wanted to write a code in my map that detected the Version and switched the TimerUtils code with another if it was a different version.

So I was looking in natives and found this.

native VersionGet takes nothing returns version

It returns version. Any idea how I can make a code return this as a boolean, like

if VersionGet()==1.23 then
call ChangeCode()
endif
 

Aizen

New Member
Reaction score
0
Well...I guess I can always run a code at map initialization. The code would use functions that only work in patch1.23b. If the code runs successfully by creating a footman, then I guess that means the game version is v1.23b+. If the footman isn't created, because the function calls aren't recognized, then that means the version is not v1.23b+.

However, I'm certain that some of these natives must work
constant native ConvertVersion takes integer i returns version
native VersionCompatible takes version whichVersion returns boolean
native VersionSupported takes version whichVersion returns boolean
 

Faust

You can change this now in User CP.
Reaction score
123
Why would you want old-type system in your map?

People can't have both versions. When the patch is out it's out.
 

Faust

You can change this now in User CP.
Reaction score
123
Thank you I can read.
I just hinted that there is no point.
 

Tom Jones

N/A
Reaction score
437
Well...I guess I can always run a code at map initialization. The code would use functions that only work in patch1.23b. If the code runs successfully by creating a footman, then I guess that means the game version is v1.23b+. If the footman isn't created, because the function calls aren't recognized, then that means the version is not v1.23b+.

However, I'm certain that some of these natives must work
constant native ConvertVersion takes integer i returns version
native VersionCompatible takes version whichVersion returns boolean
native VersionSupported takes version whichVersion returns boolean
Then your code won't work for versions less than 1.23b. The map code is parsed before creation, if the parser finds unrecognized function calls the map is simply not created.
 

Aizen

New Member
Reaction score
0
:mad:Looks like I'll just have to do two releases then. Yeah, you're right, you won't be able to save the map with codes from the newer version.
 
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