Script


(kennie) #1

Hi

I made a map but if i start with the script he says:
G_Script_ScriptParse(), Error (line
120): ‘)’ expected, end of script
found.

And this is my script:

game_manager
{
   spawn
   {
		// Game rules
		wm_axis_respawntime	20
		wm_allied_respawntime	20
		wm_number_of_objectives 1
		wm_set_round_timelimit	20

		wm_objective_status 1 1 0
		wm_objective_status 1 0 0

		// Stopwatch mode defending team (0=Axis, 1=Allies)
		wm_set_defending_team	0

		// Winner on expiration of round timer (0=Axis, 1=Allies)
		wm_setwinner	0
	}

	// Sets the winner when the wall blows!
	trigger allies_win
	{
		wm_setwinner	1
		wm_announce "Allied team has blown the Wall!"

		wm_objective_status 1 0 2
		wm_objective_status 1 1 1

		wait 1500
		wm_endround
	}
}

the wall
{
   spawn
   {
      wait 200
      constructible_class 3
   }
   death
   {
      wm_announce "Allies have blown up The Wall!"
	wait 2000
	trigger game_manager allies_win
   }
}

defending wall #1
{
   spawn
   {
      wait 200
      constructible_class 3
   }
   death
   {
      wm_announce "Allies have blown up Defending Wall #1!"

   }
}

defending wall #2
{
   spawn
   {
      wait 200
      constructible_class 3
   }
   death
   {
      wm_announce "Allies have blown up Defending Wall #2!"

   }
}

construction_script 
{ 
   spawn 
   { 
      wait 200 
      constructible_class 2 
      trigger self startup 
   } 

   buildstart final 
   { 
   } 

   built final 
   { 
      setstate construction_extra default 
      setstate construction_mg42  default 
      setstate const_tower        invisible 

      // Some kind of UI pop-up to alert players 
      wm_announce   "Axis team has built the mg!" 
   } 

   decayed final 
   { 
      trigger self startup 
   } 

   death 
   { 
      trigger self startup 
      // Some kind of UI pop-up to alert players 
      wm_announce   "Allies team has destroyed the mg!" 
   } 

   trigger startup 
   { 
      setstate construction_extra invisible 
      setstate construction_mg42  invisible 
      setstate const_tower        default 
      repairmg42 construction_mg42 
   } 
}

(DaRkFiRe) #2

Well, for everyone { you need a }. So the chances are there is one without the other. An easy way to detect this is to download crimson editor. Search around on the forums for it.


(Drakir) #3

Cant find anything wrong there! Perhaps i am blind…but i have looked through this script more than once.


(SiliconSlick) #4

Maybe a newline required at the end?

Try adding a line with

//EOF

at the bottom.

SiliconSlick


(Drakir) #5

Found the problem, seems like u cannot use spaces in scriptnames/targetnames. Or perhaps it was the # in the name…dunno, i remade the names and then it worked fine.


(SiliconSlick) #6

Doh! Good catch… I imagine both those things
would cause problems.

SiliconSlick