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

Fatal Error Help - Dear God Save Me

Status
Not open for further replies.
Level 3
Joined
Apr 7, 2007
Messages
48
My map! My precious map, it wont start up anymore, as soon as it does it crashes because of a fatal error. I have absolutley no idea how to fix this. Someone ;_; im gonna cry.
 
Level 34
Joined
Sep 6, 2006
Messages
8,873
I am pretty sure you can't. Sorry mate, it's happened to all of us. Always remember to back up on another HD if possible.

I am pretty sure system restores won't work either. You go back in time and it's broken still. I wouldn't bother trying this.
 
Level 3
Joined
Apr 7, 2007
Messages
48
After randomly disabling triggers I found the culprit ... err i think does anyone see anything wrong with this:
  • Forest Init
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Game - Display to (All players) the text: |CFFFF8A08Level 1|R...
      • Player - Set the current research level of Level 1 to 1 for Player 12 (Brown)
      • Player - Set the current research level of Spirit Number to 2 for Player 12 (Brown)
      • Player - Set the current research level of Eater Number to 1 for Player 12 (Brown)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • journal_level Equal to 1
        • Then - Actions
          • Set tmp_point = (Random point in Forest <gen>)
          • Unit - Create 1 Dark Artifact for Player 8 (Pink) at tmp_point facing Default building facing degrees
          • Set journal_unit = (Last created unit)
          • Hero - Create Mysterious Journal and give it to journal_unit
          • Trigger - Add to Journal Drop <gen> the event (Unit - A unit comes within 400.00 of journal_unit)
        • Else - Actions
      • Destructible - Kill Long Natural Bridge (Vertical) 0482 <gen>
      • Set tmp_point = (Random point in Forest <gen>)
      • Unit - Create 1 Dark Artifact for Player 8 (Pink) at tmp_point facing Default building facing degrees
      • Set currentartifact = (Last created unit)
      • Hero - Create Dark Heart of the Woods and give it to currentartifact
      • Trigger - Add to Kill Artifact <gen> the event (Unit - A unit comes within 400.00 of currentartifact)
      • Custom script: call RemoveLocation( udg_tmp_point )
      • Custom script: call DestroyTrigger(GetTriggeringTrigger())
This is the trigger for level 1 of the map .. i have 8 levels and this didnt start acting up until now, I found this strange ... but it loads, now if only I could get my level 1 working again ^^;
 
Level 34
Joined
Sep 6, 2006
Messages
8,873
You should have mentioned that you could open it in WE, it makes all the difference in the world. Which you just found out! lol
 
Level 2
Joined
Oct 18, 2007
Messages
23
Generally Putting too many things at the start of the map is the thing that crashes maps. Just try to put it a wait of 1 seconds or 2. This will work. Also try to put as many as less actions as possible.
 
Level 3
Joined
Apr 7, 2007
Messages
48
@Yoshi, still doesn't work
@The_wand_mirror : Tried that still doesnt work

  • Kill Artifact
    • Events
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Owner of (Triggering unit)) Equal to Player 11 (Dark Green)
          • (Owner of (Triggering unit)) Equal to Player 12 (Brown)
    • Actions
      • Set tmp_point = (Position of (Triggering unit))
      • Unit - Move currentartifact instantly to tmp_point
      • Unit - Kill currentartifact
      • Custom script: call RemoveLocation( udg_tmp_point )
  • Journal Drop
    • Events
    • Conditions
      • ((Owner of (Triggering unit)) is an ally of Player 1 (Red)) Equal to True
      • (Owner of (Triggering unit)) Not equal to Player 8 (Pink)
    • Actions
      • Set tmp_point = (Position of (Triggering unit))
      • Unit - Move currentartifact instantly to tmp_point
      • Unit - Kill journal_unit
      • Custom script: call RemoveLocation( udg_tmp_point )
Those are the other 2 triggers.
 
Level 11
Joined
Aug 25, 2006
Messages
971
I'm almost certain (90%) that the problem is the last laction. Destroying a trigger is not the same as turning it off. Destroying a trigger thats not disabled is not smart! Remove that line of code and try it again.
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,180
Nope, destroying an on trigger works fine for me with local triggers in jass.
I say your problem is your adding items to a unit that has just been created, try inserting a wait after you create the unit before adding the items.

Also make sure the unit has inventory to carry the items.
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,180
Then that proves it, the crash is caused by the adding of the items, try disabling the adding of the items.

Anyway, the crash is caused by your set X = lasted created unit, as the GUI create unit action makes a group not a single unit. Thus it is set to null so your adding an item to no unit so it crashes.
 
Level 9
Joined
Jun 26, 2007
Messages
659
but in jass you can create "1 unit" and not "n units" with n=1
so with a custom script line, that would be ok :
  • Custom script: set udg_journal_unit = CreateUnitAtLoc(ConvertedPlayer(8), ???, udg_tmp_point, bj_UNIT_FACING)
??? is the unit id, i can't know it, to know it use it in a temporary trigger, convert it into text and search the value between simple quote, looks like 'U003' or something like that
 
Level 3
Joined
Apr 7, 2007
Messages
48
Ahhh see now thats a smart idea thanks to both of you I'm going to try that right now. And also Yoshi just press Ctrl+D in the Obj Editor to see the raws for everthing.

And it worked!
Here's the trigger for future reference.
  • Forest Init
    • Events
      • Time - Elapsed game time is 2.00 seconds
    • Conditions
    • Actions
      • Game - Display to (All players) the text: |CFFFF8A08Level 1|R...
      • Player - Set the current research level of Level 1 to 1 for Player 12 (Brown)
      • Player - Set the current research level of Spirit Number to 2 for Player 12 (Brown)
      • Player - Set the current research level of Eater Number to 1 for Player 12 (Brown)
      • Destructible - Kill Long Natural Bridge (Vertical) 0482 <gen>
      • Set tmp_point = (Random point in Forest <gen>)
      • Custom script: set udg_currentartifact = CreateUnitAtLoc(ConvertedPlayer(8), 'u005', udg_tmp_point, bj_UNIT_FACING)
      • Hero - Create Dark Heart of the Woods and give it to (Last created unit)
      • Trigger - Add to Kill Artifact <gen> the event (Unit - A unit comes within 400.00 of (Last created unit))
      • Custom script: call RemoveLocation( udg_tmp_point )
Thanks alot for the help, I can start working again.
 
Level 3
Joined
Apr 7, 2007
Messages
48
Ok fine, thats resolved but I found another one which occurs when a unit picks up the artifacts. Its supposed to move the item into a storage unit but it crashes when the storage gets an item. Is there any way to fix this?
 
Level 11
Joined
Aug 25, 2006
Messages
971
Is the item a 'use on pickup' item? Are you waiting .3 seconds [after the unit picks up the item] before moving the item? (Without the wait sometimes it won't work properly) Does the dummy unit have the proper inventory capacity/settings?
 
Status
Not open for further replies.
Top