• 🏆 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] Latest map script leads to incorrect lobby and not being able to play the map

Status
Not open for further replies.
Level 25
Joined
Feb 2, 2006
Messages
1,686
Hi,
recent changes of my map script led to it not being playable anymore. The lobby is shown incorrectly with no players in the forces and testing the map is not possible anymore.
I have downloaded an older version of the map and imported the latest code and triggers and this is what caused the issue. I still have both versions of the map scripts but can't find the issue in the diff.
The syntax checker from a toll like JassCraft (probably pjass) doesn't find any errors, neither does the World Editor.
Any idea what might be the issue here or how to find it? Is there any limit of the map script size?

I get the following warning with the diff tool meld:
"There was a character encoding conversion error and it was needed to use a fallback character."
only for the new file but I cannot find the invalid characters.
Is there any tool to find them.
 

Attachments

  • 2.1_war3map_old.j
    3.7 MB · Views: 9
  • 2.1_war3map_new.j
    4 MB · Views: 9

LeP

LeP

Level 13
Joined
Feb 13, 2008
Messages
539
I get the following warning with the diff tool meld:
"There was a character encoding conversion error and it was needed to use a fallback character."
only for the new file but I cannot find the invalid characters.
Is there any tool to find them.
Code:
$ grep -P -n "[\x80-\xFF]" 2.1_war3map_new.j | head 
grep: 2.1_war3map_new.j: Übereinstimmungen in Binärdatei
4878:            set Ascii__c[161]="¡"
4879:            set Ascii__c[162]="¢"
4880:            set Ascii__c[163]="£"
4881:            set Ascii__c[164]="¤"
4882:            set Ascii__c[165]="¥"
4883:            set Ascii__c[166]="¦"
4884:            set Ascii__c[167]="§"
4885:            set Ascii__c[168]="¨"
4886:            set Ascii__c[169]="©"
4887:            set Ascii__c[170]="ª"
Seems like your encoding errors are coming from the ascii library. Now unfortunately that shouldn't be the problem but i guess it's worth checking out. In you previous mapscript the only non-ascii characters are in comments only. Who knows.
 
Level 39
Joined
Feb 27, 2007
Messages
4,992
I experienced something similar with a map that I can upload if it’s relevant. The creator of the map can host it just fine but have the same forces issue and am unable to launch the map from any lobby. I can launch the game via Test Map, though.
 

Wrda

Spell Reviewer
Level 25
Joined
Nov 18, 2012
Messages
1,870
Moving the code from my custom map script into a converted trigger seemed to help. I remember that there was some issue with certain characters in the custom map script.
Yeah. And I also remember there was some sort of limit to amount of characters contained there too? From what I recall, it didn't allow long, multiple functions. It would start to throw errors.
 
Level 19
Joined
Jan 3, 2022
Messages
320
For Lua, the game always generates a meaningful error message in memory if it was a script error. I used to dump process memory and search for "war3map" in it to find the error msg (see my luahelper thread for extraction commands).
I'm not sure, but I think the error message is also written to one of the game log files?
I don't know if WC3 does any of that for Jass maps.
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,191
Lobby not showing means there is a syntax error. The map script is partly responsible for setting up the lobby.

Quite possibly an issue with the ASCII library as ASCII is only well defined for the first 128 characters. After that it is "extended ASCII" which is often code page dependent. Everything should be Unicode now but maybe some parts still are not.
 
Status
Not open for further replies.
Top