scripting error


(radysmokey) #1

get this error g_script_scriptparse() , error (line 147) : ’ } ’ expected, end of script found.

heres my script:
game_manager
{
spawn
{
}
}

Tank_Wall
{
spawn
{
wait 200
constructible_class 3
}

death
{
wm_announce “Allies have blown the Tank wall!!”
}
}
construction_script
{
spawn
{
wait 200
constructible_class 2
trigger self startup
}

buildstart final
{
}

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

// Some kind of UI pop-up to alert players
wm_announce “Axis team has built the construction!”
}

decayed final
{
trigger self startup
}

death
{
trigger self startup
// Some kind of UI pop-up to alert players
wm_announce “Allied team has destroyed the construction!”
}

trigger startup
{
setstate construction_extra invisible
setstate construction_mg42 invisible
setstate construction_materials default
repairmg42 construction_mg42
}
}
wm_mapdescription “Allies must find a steal the misile doc’s.”

wm_set_round_timelimit 15
wm_axis_respawntime 30
wm_allied_respawntime 40
wm_number_of_objectives 2

wm_set_objective_status 1 0
wm_set_objective_status 2 0

wm_overview_image “gfx/2d/mp_objectives/levelname_obj_overview.tga”
wm_objective_image 1 “gfx/2d/mp_objectives/levelname_obj_1.tga”
wm_objective_image 1 “gfx/2d/mp_objectives/levelname_obj_2.tga”

// Axis objective descriptions
wm_objective_axis_desc 1 “Primary Objective:**protect docs.”
wm_objective_short_axis_desc 1 “protect docs”
wm_objective_axis_desc 2 “Primary Objective:**stop allies breaching the tank_wall.”
wm_objective_short_axis_desc 2 “stop allies breaching the tank_wall”

// Allied objective descriptions
wm_objective_allied_desc 1 “Primary Objective:**get the missile docs.”
wm_objective_short_allied_desc 1 “transmit them”
wm_objective_allied_desc 2 “Primary Objective:**destroy the tank_wall.”
wm_objective_short_allied_desc 2 “destroy the tank_wall”

// If the round timer expires, who wins?
wm_setwinner 0

// Set status flag of objective
accum 1 set 0
}

// Axis object taken (objective 1)
trigger axis_object_stolen
{
wm_set_objective_status 1 1
}

// Axis object returned (objective 1)
trigger axis_object_returned
{
wm_set_objective_status 1 0
}

// Objective 2 has been taken to destination
trigger objective_2_done
{
// Mark objective as delivered
accum 1 set 1
wm_set_objective_status 2 1
wm_announce “Allies have taken the doc’s and stole them t00 Bad Axis!”

// Check if game won
trigger game_manager objectives_complete
}

// Are objectives complete?
trigger objectives_complete
{
// Abort this function if objective 1 has not been destroyed
accum 1 abort_if_not_equal 1

// Mark Allies as the winners
wm_setwinner 1

// End the level
wm_endround
}
}

// The Allies have taken the Axis object to it’s destination
allied_objective_2
{
spawn
{
}

death
{
trigger game_manager objective_2_done
}
}


(ziege) #2

If the error is

(line 147) : ’ } ’ expected, end of script found.

Then look on line 147, you’re probably missing a }


(DeAtHmAsTeR) #3

No it isnt that

i had the same problem

this happens because you have used the wrong Slashes to write a description of a line

Use this script

game_manager 
{ 
spawn 
{ 
} 
} 

Tank_Wall 
{ 
spawn 
{ 
wait 200 
constructible_class 3 
} 

death 
{ 
wm_announce "Allies have blown the Tank wall!!" 
} 
} 
construction_script 
{ 
spawn 
{ 
wait 200 
constructible_class 2 
trigger self startup 
} 

buildstart final 
{ 
} 

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


wm_announce "Axis team has built the construction!" 
} 

decayed final 
{ 
trigger self startup 
} 

death 
{ 
trigger self startup 

wm_announce "Allied team has destroyed the construction!" 
} 

trigger startup 
{ 
setstate construction_extra invisible 
setstate construction_mg42 invisible 
setstate construction_materials default 
repairmg42 construction_mg42 
} 
} 
wm_mapdescription "Allies must find a steal the misile doc's." 

wm_set_round_timelimit 15 
wm_axis_respawntime 30 
wm_allied_respawntime 40 
wm_number_of_objectives 2 

wm_set_objective_status 1 0 
wm_set_objective_status 2 0 

wm_overview_image "gfx/2d/mp_objectives/levelname_obj_overview.tga" 
wm_objective_image 1 "gfx/2d/mp_objectives/levelname_obj_1.tga" 
wm_objective_image 1 "gfx/2d/mp_objectives/levelname_obj_2.tga" 

wm_objective_axis_desc 1 "Primary Objective:**protect docs." 
wm_objective_short_axis_desc 1 "protect docs" 
wm_objective_axis_desc 2 "Primary Objective:**stop allies breaching the tank_wall." 
wm_objective_short_axis_desc 2 "stop allies breaching the tank_wall" 

wm_objective_allied_desc 1 "Primary Objective:**get the missile docs." 
wm_objective_short_allied_desc 1 "transmit them" 
wm_objective_allied_desc 2 "Primary Objective:**destroy the tank_wall." 
wm_objective_short_allied_desc 2 "destroy the tank_wall" 

wm_setwinner 0 

accum 1 set 0 
} 

trigger axis_object_stolen 
{ 
wm_set_objective_status 1 1 
} 

trigger axis_object_returned 
{ 
wm_set_objective_status 1 0 
} 

trigger objective_2_done 
{ 
accum 1 set 1 
wm_set_objective_status 2 1 
wm_announce "Allies have taken the doc's and stole, them t00 Bad Axis!" 

trigger game_manager objectives_complete 
} 

trigger objectives_complete 
{ 
accum 1 abort_if_not_equal 1 

wm_setwinner 1 

wm_endround 
} 
} 

allied_objective_2 
{ 
spawn 
{ 
} 

death 
{ 
trigger game_manager objective_2_done 
} 
}

Plus - i notice you have used some RTCW scripting like wm_mapdescription the map description and stuff on loading map is now held in a .arena file in scripts/yourmapname.arena


(*[SfS]*OpTeRoN) #4

Actually I believe it’s held in the “mapname.objdata” file in ET.

-Opteron
:drink:


(DeAtHmAsTeR) #5

Objective data is held in an .objdata file
the stuff on loading screen is in a .arena file


(*[SfS]*OpTeRoN) #6

Err… wm_mapdescriptin goes in the .objdata file not the .arena file…
Look at the map files that came with ET.

-Opteron
:drink:


(DeAtHmAsTeR) #7

look in scripts/railgun.arena , radar.arena, battery.arena

i cant even find any .objdata files :banghead:

where are they?

have a look in the .arena files first :smiley:


(*[SfS]*OpTeRoN) #8

There is no wm_mapdescription in any of my .arena files
The .objdata files are in the /maps folder


(DeAtHmAsTeR) #9

look - here is the .objdata file for battery

wm_mapdescription allied “Remove the threat to Allied shipping by silencing the Siegfried 15 inch battery: fight your way into the battery and dynamite the Gun Controls.”
wm_mapdescription axis “Our mighty Siegfried 38cm shore battery is terrorizing Allied shipping. Protect Siegfried from Allied sabotage.”
wm_mapdescription neutral “The mighty Axis shore battery ‘Siegfried’ is harassing Allied shipping in the Mediterranean. The Axis must protect Siegfried from Allied attempts at sabotage.”

// Axis Objective Descriptions
wm_objective_axis_desc 1 “Primary Objective:**Defend the Battery Gun until the Allied convoy comes into range.”
wm_objective_axis_desc 2 “Secondary Objective:**Prevent the Allies from constructing an Assault Ramp up the West side of the Beach.”
wm_objective_axis_desc 3 “Secondary Objective:**Defend the West Bunker from the Allies.”
wm_objective_axis_desc 4 “Secondary Objective:**Defend the Generator which holds the magnetic Bunker Doors shut.”
wm_objective_axis_desc 5 “Secondary Objective:**Prevent the Allies from establishing a Command Post in the East Bunker.”
wm_objective_axis_desc 6 “Secondary Objective:**Set up a Command Post in the East Bunker.”

// Allied Objective Descriptions
wm_objective_allied_desc 1 “Primary Objective:**Destroy the Battery Gun to allow the Allied convoy to pass unharmed.”
wm_objective_allied_desc 2 “Secondary Objective:**Construct an Assault Ramp up the West side of the Beach.”
wm_objective_allied_desc 3 “Secondary Objective:**Capture the West Bunker from the Axis.”
wm_objective_allied_desc 4 “Secondary Objective:**Destroy the Generator which keeps the magnetic Bunker Doors shut.”
wm_objective_allied_desc 5 “Secondary Objective:**Establish a Command Post in the East Bunker.”
wm_objective_allied_desc 6 “Secondary Objective:**Prevent the Axis from fortifying their position with a Command Post in the East Bunker.”

and here is the battery.arena

{
map “battery”
longname “Seawall Battery”
type “wolfmp wolfsw wolflms”
timelimit 30
axisRespawnTime 20
alliedRespawnTime 20
lmsbriefing “A giant lurks on the coast of North Africa. Built into the very living rock of the Libyan coastline, the Siegfried battery dominates the Southern Mediterranean. Siegfried’s colossal 15 inch gun is terrorizing Allied shipping and protects Sicily from all Allied attempts at invasion. Here in North Africa, the Allies and Axis are put face to face, it’s a fight to the death.”
briefing “The mighty Axis shore battery ‘Siegfried’ is harassing Allied shipping in the Mediterranean. The Axis must protect Siegfried from Allied attempts at sabotage.”
axiswintext “The tenacity and bravery shown by the Axis forces in the successful defence of the Siegfried battery has won the day and bought them yet more time to strengthen the Reich’s defences. Superior Axis courage and tactical expertise have inflicted a humiliating defeat on the Allied attackers whose meagre tactical talents and faltering courage failed to impress. Allied Supreme Command is mightily displeased with this shoddy display. Lacking either guts or skill, the Allies’ poor showing means that any invasion plans have had to be shelved until another way can be found to silence Siegfried.”
alliedwintext “This convincing Allied victory has saved their shipping from Siegfried and has brought the build-up towards an invasion of Axis-occupied Europe ever closer. The skill they have shown in assaulting beach positions will prove of vital importance in the rest of the war. The Axis High Command are dismayed: the Axis forces have shown themselves lacking in fighting spirit and incapable of defending vital objectives, even when massively fortified. The Axis must do better: if they can’t control North Africa, they can hardly hope to hold on to Western Europe.”
mapposition_x 491
mapposition_y 849
}

This is quite weird :???:

the arena file is for the loading screen , .objdata is for limbo screen.

Discussion closed :smiley: (always wantd to say that)


(repT|Le) #10

can someone help me with my script: i get every up and running but my two objectives don’t seem to be destroyable.
i’ve set up the following pairs on the func_explosive:

spawnflags 12
scriptname percy_obj1
targetname percy
mass 100
type wood
health 0
dmg 75
classname func_explosive

same goes for objective #2.

then i have the script:

game_manager
{
	spawn
		{
		// Set scenario information

		wm_number_of_objectives 2

		wm_set_round_timelimit 15

		// Set Defending Team for SW Mode
		wm_set_defending_team 0
		wm_setwinner 0
		accum 1 set 0
		accum 2 set 0
		}

	trigger objective1
		{
		wm_objective_status 1 1 2
		accum 1 set 1
		wm_announce "Allied team has destroyed percy!! no!!!!"
		trigger game_manager checkgame
		}

	trigger objective2
		{
		wm_objective_status 2 1 2
		accum 2 set 1
		wm_announce "Allied team has killed tommy!!! waaaaaaaaaa!!"
		trigger game_manager checkgame
		}

	trigger checkgame
		{
		accum 1 abort_if_not_equal 1
		accum 2 abort_if_not_equal 1
		wm_setwinner 1
		wait 1500 
		wm_endround
		}
}
	percy_obj1 
		{
		spawn
			{
			}
		death
			{
			trigger game_manager objective1
			}
		}

	tommy_obj2
		{
		spawn
			{
			}
		death
			{
			trigger game_manager objective2
			}
		}

i’ve also set up .arena (in the scripts folder) and .objdata (same as the map).
i try to run a normal game, pressing Host and choosing my testmap, successfully load it, but in game i set the dyno, tik tak tik tak - bum, but the obj remains intact.
so what am i doing wrong?


(nUllSkillZ) #11

You should add

wait 100

in the spawn script block of the two “func_explosive”-entities.
Should these “func_explosive”-entities be destroyable by dynamite or satchel?
Then you should add

constructible_class 3

(that’s dynamite / 2 is for satchels) to tha spawn script block of the two “func_explosive”-entities.


(repT|Le) #12

wow really a quick reply :slight_smile:

i’ve added the two strings, works perfectly.

thanx nullskillz.


(Malverik) #13

@radysmokey

the script routine “construction_script” is ended right after “trigger startup” because of the }. That means everything after that (like wm_mapdescription “Allies must find a steal the misile doc’s.”" isnt part of any script blocks