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

[Solved] Doesn't save.

Status
Not open for further replies.
Level 6
Joined
Mar 2, 2013
Messages
127
So I had to swap cd keys for my pc. I uninstalled warcraft 3, then re installed it.

For some reason my editor doesn't save anymore. It gives me a bunch of code, and says theres a bunch of errors in it.
I didn't have a problem with it before I uninstalled then re installed warcraft.

using jass newgen pack jngp 2.0


EDIT:

I fixed this. I just took all the warcraft 3 files from my other computer and replaced it with the one I had. Not sure why it wouldn't save, but at least it works now.
 

Attachments

  • Error.png
    Error.png
    175.4 KB · Views: 298
Last edited by a moderator:
Level 22
Joined
Sep 24, 2005
Messages
4,821
You must be using an older JNGP version(?) since the error says it(pjass) doesn't know what a hashtable is.
 
Level 6
Joined
Mar 2, 2013
Messages
127
No, its not a problem with the jngp version, i used it yesterday and nothing was wrong.
it says pjass because i installed cjass with the newgen pack.

I've downloaded the newest version of newgen.
No more start up errors when you first open.
But when I try to open my map it says.
Function trigger does not exist in the database:InitHashtableBJ
and
Function trigger does not exist in the database:GetLastCreatedHashtableBJ
Then it just crashes WE when i try to save.
 
Last edited:
Level 23
Joined
Apr 16, 2012
Messages
4,041
this actually isnt problem of JassHelper, because yes TESH and stuff wont highlight the Hashtable natives, and maps with hashtable function calls will be marked as newer versions, but it will compile just fine even with pure JNGP5d

the problem most likely is, that you didnt patch the game and had old mpq's and game, which will not recognize hashtables for instance were added with 1.24 patch, and freshly installed is 1.06
 
@DSG -
I'm talking about Moyack's compilation (before the 2.0 project) which supposedly has the latest JH already...

@edo - If it's a problem with patch, it probably won't even open the map because it won't find the Hashtable natives in the wc3 mpqs [just like how opening a WEU map with custom triggers in normal WE won't work]... it only happens during save because it is a JH problem (as DSG said, JH has a separate list of natives, it doesn't use the wc3 list)...
 
Jass Helper maintains a separate native list. Unless you update it, it will throw a syntax error when you call hashtable natives or use the type since as far as it is aware they have not been declared.

JASSHelper doesn't maintain a separate native list. Every time you save, SFMPQ reads common.j and Blizzard.j from war3patch.mpq, and puts it in the jasshelper folder. Then it passes the common.j and Blizzard.j as arguments to pjass.exe.

The issue here is the version of PJASS. The wc3 syntax checker became very strict about type after patch 1.24, so certain Blizzard.j functions that relied on implicit typecasting no longer compiled. Because of that, Blizzard actually had to rewrite those functions:
JASS:
function GetFadeFromSeconds takes real seconds returns integer
    if (seconds != 0) then
        return 128 / R2I(seconds)
    endif
    return 10000
endfunction

// Before patch 1.24, this function looked like:
function GetFadeFromSeconds takes real seconds returns integer
    if (seconds != 0) then
        return 128 / seconds
    endif
    return 10000
endfunction

Keep in mind that PJASS is a user-developed syntax checker. When the editor was updated to disallow the return-bug typecasting (after 1.24), PJASS needed to be updated to throw an error on it. Otherwise, maps exploiting the return bug would save just fine in JNGP, but would fail to run in wc3. PitzerMike made the update to PJASS, and it was bundled in the latest release of JNGP.

Now, let's say you run version switcher to get to patch 1.20. If you try to save any map, PJASS will throw an error. Why? It is still the type-strict version from post 1.24, so it will throw errors on the old Blizzard.j it is reading (because it abused the return bug as well. not as severely as we did though :p).

So what is the solution? (A) Update to any patch after 1.24 (B) Find an older version of PJASS (C) Disable PJASS (Grimoire -> Uncheck "Disable WE Syntax Checker").

It looks like the OP already solved it by copying the files, but hopefully this explanation will clear some things up. ;D
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Well the original and best notes to get it working was.
1. Update JASS Helper
2. Update native list

Seeing how JASS Helper threw all manner of garbage when saving without doing this, it seemed only logical it did not fetch them. Alas, these were later removed from all official documentation for the silly version switcher rubbish.
 
Status
Not open for further replies.
Top