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).
And here is SimError
______________________________________________________________
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]
- Conditions
- Or - Any (Conditions) are true
- 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!")
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
- If - Conditions
- 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]
- Conditions
- Or - Any (Conditions) are true
- 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!")
- If - Conditions
- Else - Actions
- If - Conditions
- 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]
- Conditions
- Or - Any (Conditions) are true
- 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!")
- If - Conditions
- Else - Actions
- If - Conditions
- 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]
- Conditions
- Or - Any (Conditions) are true
- 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!")
- If - Conditions
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
- Custom script: call SimError(GetOwningPlayer(GetTriggerUnit()), "You must have visibility in that area in order to build there!")
- If - Conditions
- Custom script: call RemoveLocation (udg_CCBuild_target_point)
- Custom script: call DestroyGroup (udg_CCBuild_check_lim_group)
- Events
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