• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[JASS] OrderId2String() returns null after loading a saved game

Status
Not open for further replies.
Level 10
Joined
May 31, 2019
Messages
139
This is an issue pertaining to my campaign/mod that uses a modified blizzard.j

What seems to be happening is that any functions that had a unit order event registered to them, be it a point order, unit order, or 'no target' order will not work, but only after loading a saved game. they will work just fine otherwise.

What's also interesting is this issue is not present in the current release of the zerg campaign, which has all its core functionality in gui triggers as opposed to this upcoming release which does everything in blizzard.j.


I've attached a a test map and a stripped-down version of the required War3Mod.mpq (no sounds/portraits so that the download is relatively small). Like the zerg campaign, it requires version 1.28 of war3.

The map is simple, it just has some units you can test the problem with. You can verify that functions which don't rely on checking the unit's orderstring work just fine after loading a saved-game. Specifically, you can morph larva. But you can not set the hatchery's rallies or open the drone build menus (which check the orderstring)

Update - Solved (kind of)

It seems I mis-diagnosed the issue.
What's actually happening is that OrderId2String() will return null after loading a saved-game, but String2OrderId() is always safe to use.

I don't know if this is a bug specific to 1.28 or not, but switching to checking orderIds rather than the result of OrderId2String() fixed the issue for me.

Beta3_blizzard_string_bug_0.jpg
Beta3_blizzard_string_bug_1.jpg
 

Attachments

  • zergsavetest.7z
    31.1 MB · Views: 19
Last edited:
Status
Not open for further replies.
Top