• 🏆 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!

Invalid number of arguments

Status
Not open for further replies.
Level 2
Joined
Feb 5, 2015
Messages
8
Hey guys, got the problem with world editor. Every my attempt in saving the map, causing this error to appear "Invalid number of arguments". Even creating the new map and saving it causes this error. The solution with "." & "," doesn't work for me. I even found the post about "Closing WE and opening your map, saving it and repeat the procces about 2-5 times" doesn't work for me too. Any suggestions?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
The problem is probably because your system is of a locale where ',' is the fractional delimiter and '.' is the thousands delimiter. Due to an oversight when creating Warcraft III they made automatically generated code use locale dependent formatting.

Examples of OS locales which are affected by this include "German" and "French". Locales based on "English" should not be affected by this.

As such "real" type arguments become corrupted since the fractional delimiter is interpreted as a change of argument. Since the number of arguments being passed to the function becomes larger the number of parameters the function takes it throws an error.

The solution is to change the locale of number formatting used by your operating system to English (United States), the locale that was used during development.

To do this go to "Control Panel\All Control Panel Items" and choose "Region and Language". If your locale is non-English (chances are if you get this error) they will be called something else with a similar meaning based on the natural language used.

Under "Formats" change the "Format:" pull down menu to "English (United States)". "English (United Kingdoms)" also works from personal experience however that is likely due to the same delimiters being used with exception of dates.

If you are a more advanced user you can just change the fractional and thousands delimiters under "Additional settings...". The "Digit grouping symbol:" must be ','. The "Decimal symbol:" must be '.'. These correspond to the locale used in the United States which was used to develop the game. Depending where you are from you might find such symbol usage alien so I would advise only using it while you develop WC3 maps. StarCraft II does not have this problem.

You may need to restart your computer before the changes take affect and World Edit build on save starts generating correctly formatted JASS. Do remember that unsaved work may be lost when restarting your computer.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
What im doing wrong?
You have not told us what you are doing...

If you are using JNGP then chances are your vJASS install is corrupted. Unless you plan to use JNGP for its various features (which I would recommend, its awesome) then you should use standard worldedit.

The problem you described that affects your standard worldedit I explained a likely cause for above. The reason it would error is because the automatic script generation cannot cope with the decimal (fractional) delimiter for your locale being ',' instead of the UK/US delimiter of '.'. Since ',' has a syntax meaning it causes script with invalid syntax to be produced so it errors on save. The solution which has been reported to work in this case is to change the decimal symbol on your OS regional settings so that it matches that used by the US (and the UK).

The JNGP problem has 3 probable causes. First is you have not disabled standard syntax checking and (you must also) enabled vJASS to do the syntax compiling and checking. Second is that your anti virus software detected JNGP as a virus due to how it injects modified code into the worldedit process (how it adds new features) so it blocked it resulting in a corrupted installation of JNGP The solution in this case is to add JNGP to the anti virus expections list so that it will not prevent it from working (I personally guarantee you this is safe as long as you downloaded it from a reliable source). Finally is that you did not update the version of vJASS that came with your JNGP to the latest version. The last official version had an obsolete vJASS with it that needed you to not only update vJASS but also manually extract the native and BJ list and replace the existing ones (not an easy thing to do). Many more modern releases of JNGP have all this already done for you however I do not officially support them.

You might wish to consider StarCraft II modding if this problem persists. They have just ported almost every asset from Warcraft III over to StarCraft II for you to use as you wish including some professional high quality remakes of some of the more memorable models. You can try the game out for free with the starter edition and hacks do exist that allow you to make maps for free (if you are a little tight on money), however to publish the maps for people to play you will need to buy the game but you have ample time to decide if you are willing to commit.
 
Status
Not open for further replies.
Top