Error?


(HalfDead) #1

hey all

i got a script problem with my map

does anyone knows the problem ?

error =

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

script =

game_manager
{
	spawn
	{
		wm_axis_respawntime	7
		wm_allied_respawntime	7
		wm_set_round_timelimit	30
		wm_number_of_objectives	8
	}
}

flag1
{
	spawn
	{
		accum 0 set 1			
	}

	trigger axis_capture				
	{
		accum 0 abort_if_equal 0 		

		accum 0 set 0 			
		wm_announce "Axis Captured The Bunker"`
		wait 50

		setautospawn "Flag1"	0	
	}

	trigger allied_capture				
	{
		accum 0 abort_if_equal 1 		

		accum 0 set 1 			
		wm_announce "Allies Captured The Bunker"
		wait 50


		setautospawn "Flag1"	1	

	trigger allies_capture				
	{
		accum 0 abort_if_equal 1 		

		accum 0 set 1 			

		wm_announce "Allies Captured The Bunker"
		wait 50

		setautospawn "Flag1"	1	
	}
}

door_obj0
{
	spawn 
	{
		wait 200
		constructible_class 3 
	}
	
	death
	{
   		wm_announce "Axis Has Destroyed Defence Door #1!"
	}
}

door_obj2
{
	spawn 
	{
		wait 200
		constructible_class 3 
	}
	
	death 
	{
   		wm_announce "Axis Has Destroyed Defence Door #2!"
	}
}

door_obj3
{
	spawn 
	{
		wait 200
		constructible_class 3 
	}
	
	death 
	{
   		wm_announce "Allies Has Destroyed Defence Door #1!"
	}
}

door_obj4
{
	spawn 
	{
		wait 200
		constructible_class 3 
	}
	
	death 
	{
   		wm_announce "Allies Has Destroyed Defence Door #2!"
	}
}

boom_obj2
{
	spawn 
	{
		wait 200
		constructible_class 3 
	}
	
	death 
	{
   		wm_announce "Allies Has Destroyed The Objective"
		wm_setwinner 1
		wait 75
		wm_endround
	}
}

boom_obj0
{
	spawn 
	{
		wait 200
		constructible_class 3 
	}
	
	death 
	{
   		wm_announce "Axis Has Destroyed The Objective"
		wm_setwinner 0
		wait 75
		wm_endround
	}
}

i tryed most things but i cant get it work

thx if someone wants to help me!
i dont know much about scripts
and if someone wants, pls tell me what i did wronge in the Flag1 codes


(HalfDead) #2

IF i did something wronge in the flag codes! :slight_smile:


(-SSF-Sage) #3

This error most likely means that there is missing some { or ". I found one:

 trigger allied_capture            
   {
      accum 0 abort_if_equal 1       

      accum 0 set 1          
      wm_announce "Allies Captured The Bunker"
      wait 50


      setautospawn "Flag1"   1   
      } // THIS WAS MISSING
    trigger allies_capture            
   {
      accum 0 abort_if_equal 1       

      accum 0 set 1          

      wm_announce "Allies Captured The Bunker"
      wait 50

      setautospawn "Flag1"   1   
   }
} 

Don’t take the time to read the script now since I’m tired, but maybe tomorrow.

Edit read the triggers again. :stuck_out_tongue: There seems to be trigger allies_capture and trigger allied_capture. Remove allies_capture. No more help today. :stuck_out_tongue:


(HalfDead) #4

ok thanks very much ^^

but now i got other problem

when i capture the flag in allies team there wont happening anything
when i capture the flag in axis team the server will give script error

error = g_scripting : setautospawn cant find target to spawn

can anyone tell me what i need to set by setautospawn? :stuck_out_tongue:

i never made cap flag before ^^


(HalfDead) #5

part of script :

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

	trigger axis_capture				// Touched by an Axis player
	{
		accum 0 abort_if_equal 0 		// do Axis own flag?

		accum 0 set 0 			// Axis own the flag
		wm_announce "Axis Captured The Bunker"`
		wait 50

		setautospawn "axis_flag"	0	// Set Axis to forward spawn
	}

 trigger allied_capture            
   { 
      accum 0 abort_if_equal 1        

      accum 0 set 1          
      wm_announce "Allies Captured The Bunker" 
      wait 50 


      setautospawn "allies_flag"   1    
      }
} 

(masterkiller) #6

Replace this :

allies_flag

By the value of the “description” key of your team_WOLF_objective.


(Flippy) #7

Try using my program, ETScript (v0.6) (it’s a few topics down). It gives you the functionality to check the consistency of { and } brackets (it counts them and tells you how much there are missing, if any).

It also tells you exactly how to use “setautspawn” as soon as you type it.

Anyway, the setautospawn command needs to reference to the “Description” key in the team_WOLF_objective as masterkiller mentioned. You most probably used the script or targetname here.


(HalfDead) #8

ahh

thanks mates ^^

now understand it :slight_smile:


(HalfDead) #9

god damn

i got other error now :<

G_picktarget : Target bunker0 not found!
G_picktarget : Target bunker1 not found!

do you know that problem too?


(Flippy) #10

You should pay attention to what the error says. It’s not an error message for nothing… It tells you what is wrong!

Now, the error tells you it did not find a target “bunker0”.

So, you have used a “bunker0” as ‘target’ somewhere, while there is no entity in your map that has “bunker0” as ‘target’ property --> Error.

Since “bunker0” is nowhere in your script you posted, I presume it is not used in the script but in another entity (either that OR you didn’t post the entire script).

You probably have an entity that once pointed to another entity with target=“bunker0” but you might have removed that entity? That could be a cause to this problem…

Just check your entities and see where the problem is.


(HalfDead) #11

can you look for the problem too?

i rly cant find it :frowning:

if you want :

xfire = g0ldeney3

if you dont want you can add me for fun :smiley: and for dutch shitting :smiley:


(Flippy) #12

Well I don’t have your map and I’m not sure I even have your entire script so I can’t really help you…

Also, if you can’t solve trivial problems like this, you might not be ready for scripting yet… Maybe you should stick to some examples that use scripting, but the key to bringing examples over to your own map is to understand them. You won’t understand them if you are simply going to try something and then call for help for every little error you get. :slight_smile:

Mapping is also the art of error-spotting and debugging.


(HalfDead) #13

hmm nvm,

i got at the wolf_TEAM_obj the target name bunker0
and on other bunker1

is that wronge? :s


(-SSF-Sage) #14

For example:
From the map file:

 key: description  value:Forward Flag

And to make ppl spawn there, run this from the script:

Setautospawn "Forward Flag" (1 or 0) 

Check your flag’s script.

Edit. you might want to check this out. -here-