Fatal Error when online

Zurtrogx

Active Member
Reaction score
24
Problem status: SOLVED

______________________________________________________________


When I test my map, I usually test it in single-player mode. However, I decided to test it with on of my friends on battle.net.

When I test it alone, everything works fine. However, when I go on battle.net, I recieve a Fatal Error when I build a structure. I find this quite strange because it doesn't occur when I test it alone.
I did NOT protect the map in any way when I hosted it.

Why would this happen?
What can I do to fix it?

Here is the trigger I have to build stuctures (unlimited build range).
Trigger:
  • Build Function
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to |cffffd700Command Centre|r
    • Actions
      • Set CCBuild_target_point = (Target point of issued order)
      • Unit - Order (Triggering unit) to Stop
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (CCBuild_target_point is visible to (Owner of (Triggering unit))) Equal to True
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (String((Issued order))) Equal to CCBuild_structure_string[0]
                  • (String((Issued order))) Equal to CCBuild_structure_string[1]
                  • (String((Issued order))) Equal to CCBuild_structure_string[2]
                  • (String((Issued order))) Equal to CCBuild_structure_string[3]
                  • (String((Issued order))) Equal to CCBuild_structure_string[4]
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Race_selected[(Player number of (Owner of (Triggering unit)))] Equal to False
                • Then - Actions
                  • Set Race_selected[(Player number of (Owner of (Triggering unit)))] = True
                  • Unit - Create 1 |cffffd700Builder|r for (Owner of (Triggering unit)) at CCBuild_target_point facing 0.00 degrees
                  • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
                  • Unit - Order (Last created unit) to build a (Unit-type((String((Issued order))))) at CCBuild_target_point
                • Else - Actions
                  • Unit - Order (Triggering unit) to Stop
                  • Custom script: call SimError(GetOwningPlayer(GetTriggerUnit()), "You have already selected your race!")
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (String((Issued order))) Equal to CCBuild_structure_string[10]
                  • (String((Issued order))) Equal to CCBuild_structure_string[14]
                  • (String((Issued order))) Equal to CCBuild_structure_string[20]
                  • (String((Issued order))) Equal to CCBuild_structure_string[24]
                  • (String((Issued order))) Equal to CCBuild_structure_string[30]
                  • (String((Issued order))) Equal to CCBuild_structure_string[34]
                  • (String((Issued order))) Equal to CCBuild_structure_string[40]
                  • (String((Issued order))) Equal to CCBuild_structure_string[44]
                  • (String((Issued order))) Equal to CCBuild_structure_string[50]
                  • (String((Issued order))) Equal to CCBuild_structure_string[54]
            • Then - Actions
              • Set CCBuild_check_lim_group = (Units in (Current camera bounds) matching ((((Matching unit) is A structure) Equal to True) and (((Owner of (Triggering unit)) Equal to (Owner of (Matching unit))) and ((Unit-type of (Matching unit)) Equal to (Unit-type((String((Issued order)))))))))
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Number of units in CCBuild_check_lim_group) Less than 3
                • Then - Actions
                  • Unit - Create 1 |cffffd700Builder|r for (Owner of (Triggering unit)) at CCBuild_target_point facing 0.00 degrees
                  • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
                  • Unit - Order (Last created unit) to build a (Unit-type((String((Issued order))))) at CCBuild_target_point
                • Else - Actions
                  • Unit - Order (Triggering unit) to Stop
                  • Custom script: call SimError(GetOwningPlayer(GetTriggerUnit()), "You have reached your limit for that building!")
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (String((Issued order))) Equal to CCBuild_structure_string[11]
                  • (String((Issued order))) Equal to CCBuild_structure_string[21]
                  • (String((Issued order))) Equal to CCBuild_structure_string[31]
                  • (String((Issued order))) Equal to CCBuild_structure_string[41]
                  • (String((Issued order))) Equal to CCBuild_structure_string[51]
            • Then - Actions
              • Set CCBuild_check_lim_group = (Units in (Current camera bounds) matching ((((Matching unit) is A structure) Equal to True) and (((Owner of (Triggering unit)) Equal to (Owner of (Matching unit))) and ((Unit-type of (Matching unit)) Equal to (Unit-type((String((Issued order)))))))))
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Number of units in CCBuild_check_lim_group) Less than 2
                • Then - Actions
                  • Unit - Create 1 |cffffd700Builder|r for (Owner of (Triggering unit)) at CCBuild_target_point facing 0.00 degrees
                  • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
                  • Unit - Order (Last created unit) to build a (Unit-type((String((Issued order))))) at CCBuild_target_point
                • Else - Actions
                  • Custom script: call SimError(GetOwningPlayer(GetTriggerUnit()), "You have reached your limit for that building!")
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (String((Issued order))) Equal to CCBuild_structure_string[12]
                  • (String((Issued order))) Equal to CCBuild_structure_string[15]
                  • (String((Issued order))) Equal to CCBuild_structure_string[16]
                  • (String((Issued order))) Equal to CCBuild_structure_string[22]
                  • (String((Issued order))) Equal to CCBuild_structure_string[25]
                  • (String((Issued order))) Equal to CCBuild_structure_string[26]
                  • (String((Issued order))) Equal to CCBuild_structure_string[32]
                  • (String((Issued order))) Equal to CCBuild_structure_string[35]
                  • (String((Issued order))) Equal to CCBuild_structure_string[36]
                  • (String((Issued order))) Equal to CCBuild_structure_string[42]
                  • (String((Issued order))) Equal to CCBuild_structure_string[45]
                  • (String((Issued order))) Equal to CCBuild_structure_string[46]
                  • (String((Issued order))) Equal to CCBuild_structure_string[52]
                  • (String((Issued order))) Equal to CCBuild_structure_string[55]
                  • (String((Issued order))) Equal to CCBuild_structure_string[56]
            • Then - Actions
              • Set CCBuild_check_lim_group = (Units in (Current camera bounds) matching ((((Matching unit) is A structure) Equal to True) and (((Owner of (Triggering unit)) Equal to (Owner of (Matching unit))) and ((Unit-type of (Matching unit)) Equal to (Unit-type((String((Issued order)))))))))
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Number of units in CCBuild_check_lim_group) Less than 1
                • Then - Actions
                  • Unit - Create 1 |cffffd700Builder|r for (Owner of (Triggering unit)) at CCBuild_target_point facing 0.00 degrees
                  • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
                  • Unit - Order (Last created unit) to build a (Unit-type((String((Issued order))))) at CCBuild_target_point
                • Else - Actions
                  • Custom script: call SimError(GetOwningPlayer(GetTriggerUnit()), "You have reached your limit for that building!")
            • Else - Actions
        • Else - Actions
          • Custom script: call SimError(GetOwningPlayer(GetTriggerUnit()), "You must have visibility in that area in order to build there!")
      • Custom script: call RemoveLocation (udg_CCBuild_target_point)
      • Custom script: call DestroyGroup (udg_CCBuild_check_lim_group)


And here is SimError
JASS:
function SimError takes player ForPlayer, string error_message returns nothing
    if udg_SimError==null then
        set udg_SimError=CreateSoundFromLabel( "InterfaceError",false,false,false,10,10)
    endif
    if (GetLocalPlayer() == ForPlayer) then
        call DisplayTimedTextToPlayer( ForPlayer,0,0,15, "|cffff0000"+error_message+"|r" )
        call StartSound( udg_SimError )
    endif
endfunction
 

nabbig2

New Member
Reaction score
43
I think this might be the culprit:
Code:
 if (GetLocalPlayer() == ForPlayer)

Getlocalplayer causes desync on battle net unless you use it correctly. I'm not a pro on the topic thouogh, sorry.
 

Zurtrogx

Active Member
Reaction score
24
WolfieNoCT said:
All that GUI just made my eyes bleed though :rolleyes: .
lol, okay.
It does seem a bit intense...
I don't know JASS too well, so GUI is nice and easy for me... and I like the pretty pictures on the side too :D

Anyway, would anyone know what causes Fatal Errors?

Because, after further testing, it seems to be happening in more than one situation:
1) When constructing a building that isn't CCBuild_structure_string[0] to CCBuild_structure_string[4]
2) When a unit dies (only occurs sometimes)

Please take note this only occurs when I host the map on battle.net AND if there are more than one human players (even if another human player has left during the game).
 

Hellohihi

New Member
Reaction score
42
You can try to pinpoint it out.

By adding in display text action before all suspicious actions.

For example:

Trigger:
  • Game - Display to (All players) the text: beforeSimFunction
    • Custom script: call SimError(GetOwningPlayer(GetTriggerUnit()), "You have reached your limit for that building!")


So that your text message will be displayed right before your fatal error.

So you might have some ideas where your fatal error is originating from.
 

Zurtrogx

Active Member
Reaction score
24
Hellohihi said:
You can try to pinpoint it out.

By adding in display text action before all suspicious actions.

Well, I went through and placed display text actions before most actions and here is the result:

No text appeared at all - even though the very first action was a display text action.

So, doesn't that mean the error must have occurred before the actions took place?
 

Zurtrogx

Active Member
Reaction score
24
I read somewhere that NewGen doesn't compile properly when you "Save as..." so you need to save it again. Since I use NewGen, I attempted this stratergy.

I hosted the game, and I managed to build two buildings, but on the third building, the Fatal Error appeared again.

Would the Fatal Error have anything to do with the fact I'm using NewGen?

EDIT: Whoops, double post. My bad. :(
 

Faust

You can change this now in User CP.
Reaction score
123
Are you certain that this is the trigger that fatalerrors your butt out?
Disable it and test again
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top