G_Script_ScriptParse, "}" expected, end of script


(Tyrlop) #1

i wanna test my map for the first time, it was a quick map made on 1 day… i do /sv_pure 0 and do /devmap zombiefun, then it this error comes :

G_Script_ScriptParse (), Error (Line 45): “}” expected, end of script found.

wierd as i see it there isnt anything wronge with line 45 (the line before the last)

script : 
script by tyrlop
zombie fun map
made for zombie mod
last edited august 2007 

// =================================================
castle_flag
{
	spawn
	{
		accum 0 set 2 // Who owns flag: 0-Axis, 1-Allied, 2-Nobody
	}
	
	trigger allied_capture
	{
		accum 1 abort_if_equal 1 
		
		accum 1 trigger_if_equal 0 castle_flag allied_reclaim 
		
		accum 1 set 1 
		
		wm_announce "Humans got the Flag!"
		
		setstate castle_wobj default
	}
	
	trigger allied_reclaim
	{
	alertentity castle_wobj // Switch command map marker
	}
	
	trigger axis_capture // Touched by an axis player
	{
		accum 1 abort_if_equal 0 // do Allies own flag?
		
		accum 1 set 0 // Axis own the flag
		wm_announce "The Zombies Captured the Flag!"
		
		setstate castle_wobj default
		alertentity castle_wobj 
		
		wm_setwinner 0
		wait 9000
		wm_endround
	}
}

any solution?? thanks :expressionless:


(Loffy) #2

hi!
I would test this version:


// Script for bla bla bla. And date.

game_manager // Start game_manager section
{
	spawn
	{
		wm_set_round_timelimit	10
		wm_axis_respawntime 10
		wm_allied_respawntime	10
	} // End spawn

}  // End game_manager section


castle_flag
{
   spawn
   {
      accum 0 set 2 // Who owns flag: 0-Axis, 1-Allied, 2-Nobody
   }

trigger allied_capture
   {
      accum 1 abort_if_equal 1
      accum 1 trigger_if_equal 0 castle_flag allied_reclaim
      accum 1 set 1
      wm_announce "Humans got the Flag!"
      setstate castle_wobj default
   }
   
trigger allied_reclaim
   {
   		alertentity castle_wobj // Switch command map marker
   }
   
trigger axis_capture // Touched by an axis player
   {
      accum 1 abort_if_equal 0 // do Allies own flag?
      accum 1 set 0 // Axis own the flag
      wm_announce "The Zombies Captured the Flag!"
      setstate castle_wobj default
      alertentity castle_wobj
      wm_setwinner 0
      wait 9000
      wm_endround
   }
}


(ShadowAgent) #3

sometimes the error isnt directly on the line said. i just got out of a similar error. the game was giving that error because two } were missing in the ABOVE scriptblock, which made two scriptblocks in one, a obviously crashing the map. i would suggest to use crimson editor (www.crimsoneditor.com), since it got a feature that tells you what { is belonging to a } (and vica versa). that allows you to spot quickly if a { or a { is missing.


(Tyrlop) #4

Thank you very much it works perfectly!!


(Loffy) #5

Great!
Now go and make some good maps!

:slight_smile:


(murka) #6

ET doesn’t really know where the { or } is missing so it says the error on the last of its kind.