• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Map File Corrupt

Status
Not open for further replies.
Level 7
Joined
May 15, 2009
Messages
192
Greetings users of the Hive

This time around, I have a more serious problem than fixing a few triggers. A map file of mine has recently become corrupt, you quite simply can't see any menues (for choosing races) when selecting the map in the map list, and when you try to start it, it lags a Little bit only to return to the map list afterwards to no avail.

If anyone has experienced a similar problem and found a solution, I would love to hear it.
I do have some old (really old) backup files, so I won't lose the entire map (it's quite an extensive project), but it's alot of work and I'd like to try any alternate solutions before reverting to a previous save.

I hope this was the appropiate thread - and I hope that someone can assist me with my problem.

Thx for reading
-Battlehound/Woodenplank
 
Level 15
Joined
Oct 29, 2012
Messages
1,474
Probably I faced this problem many times
It's actually caused because one or more triggers have a failing code trigger

The thing you need to do is : Check Map Initialization trigger , check all triggers...

For now I can't give u any hint , You need to tell me :
- What is the World Editor you use ? Is it JNGP or Normal Editor ?
- Is your map all in JASS or GUI ?

Regards...
 
^JNGP Normal WE Error is Version 1.21, if you enable it, it'll throw you TONS of errors.
That's why JassHelper exist.

Here's my guide :
  • Update JassHelper to latest version.
  • Save the map with the latest JassHelper (Vexorian JassHelper).
  • Check if there's any error, if there's any, show them here.
  • If not, then it should be unrelated with Trigger Editor.
 
Level 7
Joined
May 15, 2009
Messages
192
I think I've discovered the problem, I recently did a put a new trigger into the map (a copy+paste from another map that I made) and the JassHelper did make some kind of comment, which I failed to write down - mistake.
The only other change that I made recently was creating a couple extra units, these did not include any custom models.

Also, I did as Daffa sugested - and came up with this:
Undefined type VarAsString_real
VarAsString_Real udg_EliteTotal_r = null

The variable in question EliteTotal_r is a real variable with default size of 0, and it is saved as being 0 in a map initialization trigger.

I am also getting a couple of "cannot convert real to null"
I think this might be the flawed trigger, which is odd because it worked perfectly in another map of mine.

  • Elite Unit Dies
    • Events
      • Unit - A unit owned by Player 10 (Light Blue) Dies
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to LB_Elite1
        • Then - Actions
          • Set EliteDruid_r = (EliteDruid_r - 1.00)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to LB_Elite2
        • Then - Actions
          • Set EliteSentinel_r = (EliteSentinel_r - 1.00)
        • Else - Actions
      • Set EliteTotal_r = (EliteDruid_r + EliteSentinel_r)
Or perhaps

  • Elite Unit is Trained Trigger
    • Events
      • Unit - A unit owned by Player 10 (Light Blue) Finishes training a unit
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Trained unit)) Equal to LB_Elite1
          • (Unit-type of (Trained unit)) Equal to LB_Elite2
    • Actions
      • -------- Type 1 --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Trained unit)) Equal to LB_Elite1
        • Then - Actions
          • Set EliteDruid_r = (EliteDruid_r + 1.00)
        • Else - Actions
      • -------- Type 2 --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Trained unit)) Equal to LB_Elite2
        • Then - Actions
          • Set EliteSentinel_r = (EliteSentinel_r + 1.00)
        • Else - Actions
      • -------- Regardless --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (EliteDruid_r + EliteSentinel_r) Equal to 6.00
        • Then - Actions
          • For each (Integer A) from 1 to 8, do (Actions)
            • Loop - Actions
              • Custom script: call IssueImmediateOrderById( GetTriggerUnit(), 851976 )
        • Else - Actions
      • Set EliteTotal_r = (EliteDruid_r + EliteSentinel_r)
Below is a link to the thread where I asked for help in initially creating the system, which I then copy+pasted into my map, using Footman and Rifleman instead of the LB_Elite1 and LB_Elite2 unit variables. That shouldn't have been a problem should it?
http://www.hiveworkshop.com/forums/editpost.php?do=updatepost&postid=2466277
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,259
and I'm using NewGen World editor.
It is caused by JassHelper not compiling the trigger script properly.

1. Make sure JNGP is installed properly. JassHelper must be the latest version.
2. Make sure the map saves with no errors. JassHelper must not throw any syntax errors for the script to be generated. If any are thrown you will need to fix them (they are errors after all) before it will save properly.
3. Sometimes JNGP bugs and does not save the map script. Saving again or multiple times will fix it.
 
Level 7
Joined
May 15, 2009
Messages
192
Heres the error message I'm getting.
It seems to me that JassHelper is installed correctly and is active, it even saves the map script alright. But it comes up with these errors:

tj2e.png
[/IMG]
 
Level 7
Joined
May 15, 2009
Messages
192
SUCCES, REPUTATION FOR EVERYONE!

The flaw was that, for whatever reason, the ElitesTotal_r variable had morphed itself into some undefined variable called "VariableReal" or something like that. Simply changing it back to real (and redoing the actions involving it) fixed it, and the map is now back to being playable.

Thanks alot to everyone for your attention and advice/help.
And have a fabulously incredible day!

-Battlehound/Woodenplank
 
Status
Not open for further replies.
Top