Someone else may have discovered these before but I haven't seen anyone post it. I know there are more ways to corrupt maps than this.
1.
Problem: some parts of your triggers are replaced with red text that say something like "value" and the editor disables the triggers.
Cause: If you have a trigger selected in the trigger editor, then go to the unit editor and change a unit's stats, then some kinds of actions and conditions in the trigger you have selected will be corrupted.
Prevention: Make sure you have no triggers selected when you edit units (select one of the folders) Also keep backup copies of your triggers in your map, but disabled. (good idea anyway)
Fixing: Just edit the triggers so that they are back the way they were before.
2.
Problem: You get lots of error messages when you try to save your map, but it only lists line numbers and doesn't tell you what triggers they are in.
Cause: You somehow managed to get a malformed statement in a trigger. I am not sure exactly how to do this, but when I fixed it on my map there was something like () where there should have been a value.
Prevention: No idea, except to save your map under a new filename every few times you save it. (a good idea anyway)
Fixing: This is hard, but it worked for me.
step 1: write down the line number of the first error (the rest of the errors are likely caused by the first one)
step 2: using the world editor go to file->export script
step 3: open the file you just saved in an editor that has line numbers (I used emacs)
step 4: find the line number the error is in, and look for something like the word "ERROR" (no kidding that was what it said in my map, it was also in the same place as the () I mentioned in causes)
step 5: look above it for some line that says something like:
function Trig_Pan_Gus_Hammer_Actions takes nothing returns nothing
This means the error is in the trigger "Pan Gus Hammer" in the actions section.
step 6: go back to your map and rewrite the part of that trigger that is causing the error.
step 7: try to save again, if it still doesn't work, check to see if the line number of the error has changed. If it did, then you are making progress! Repeat the process from step 1.
I don't know if these are the same problems everyone else is having, but knowing this stuff would have helped me a lot so I hope it helps other people.
Back to top
|