STUPID STUPID SCRIPT ERROR!!!!!! or is it me tht stupid?HLP


([SSM] Shadow Meat) #1

i follow this tutorial on contctruction stuff
http://www.wolfensteinx.com/surface/tutorials/et_simple_constructible.html
and i keep getting the error:

G_Script_ScriptParse(), Error (line 96): unknown event: fence.

\AHHHHHHH wot do i do wot do i do???


([SSM] Shadow Meat) #2

AHHHHHHHHHHHHHHHH!!!
:banghead: :banghead: :banghead: :banghead: :banghead: :banghead: :banghead: :banghead:


([SSM] Shadow Meat) #3

AHH EVERYONE KEP VOTING THT IM A IDIOT :frowning: AHHHH WOT DID I DO WRONG THEN SMART ARSES???


(.Chris.) #4

Probably nothing to do with the tripple post, or the 100 posts in a row in your other topic, post your script here and maybe someone can help i suspect youve missed out a { or a } somewhere.


(DWM|Commando) #5

umm for starters that tutorial hasnt been fixed i don’t think, so there is an error which i addresses in a previous post. also post the script so we can see what the error on line 96 is!


([SSM] Shadow Meat) #6

fence <line 96 here (i think)>
{
spawn
{
}
built final
{
}
decayed final
{
}
death
{
}
}
spawn
{
wait 200
constructible_class 3
constructible_constructxpbonus 10
constructible_destructxpbonus 10
setstate fence_materials invisible
}
built final
{
setstate fence default
setstate fence_materials invisible
}
decayed final
{
setstate fence_materials default
setstate fence invisible
}
death
{
wm_announce “The fence has been destroyed!”
setstate fence_materials default
}
}


(damocles) #7

can you also post the lines above the fence routine - I have a feeling you’ve missed the closing } from the routine above it.

edit: you also seem to have some mistakes in that section posted - you have a section like:

fence <line 96 here (i think)>
{
spawn
{
}
built final
{
}
decayed final
{
}
death
{
}
} ----------------- this line is closing the fence entity
spawn -------------so how come you have a spawn line here?
{


([SSM] Shadow Meat) #8

game_manager //need a script_multiplayer with scriptname = game manager to autoexec
{
spawn
{
remapshaderflush

	// Game rules
	wm_axis_respawntime	1  //FOR TESTING ONLY!
	wm_allied_respawntime	1  //FOR TESTING ONLY!
	wm_number_of_objectives	2
	wm_set_round_timelimit	30

	// Objectives
	//1: Collect Gold Barrel and drop off
            //2: Collect Gold Phone and drop off

	// Current main objectives for each team (0=Axis, 1=Allies)
	wm_objective_status 1 1 0
	wm_objective_status 1 1 0
	wm_objective_status 2 1 0
	wm_objective_status 2 1 0


	//Accum values
	accum 1 set 0 //Overall Axis status
	accum 2 set 0 //Overall Allied status

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

	// Winner on expiration of round timer (0=Axis, 1=Allies, -1=no winner at expiration)
	wm_setwinner	-1

	wait 2000

// setautospawn “sz1” 1 //Uses name from description field of team_WOLF_objective
// setautospawn “sz1” 0

}

//Objective Flags

trigger obj1  //Return of Allied Gold and Radar Parts
       	 {
                    	//Set to objective accum to 1 so we know that the objective has been completed
                    	accum 1 inc 1

                    	//Call function called checkgame in game_manager to check if the round has been won
                    	trigger game_manager axis_checkgame
       	}

trigger obj2  //Return of Axis Gold and Radar Parts
       	{
                    	//Set to objective accum to 1 so we know that the objective has been completed
                    	accum 2 inc 1

                    	//Call function called checkgame in game_manager to check if the round has been won
                  	trigger game_manager allied_checkgame
       	}

trigger axis_checkgame
       	{
                    	//Here we check if the accum 1 contains 2, 
                    	//if it doesn't then we do not execute the 2 remaining lines 
                    	//in this function but just continue with the game
                    	accum 1 abort_if_not_equal 2

                    	//If this line gets executed it means that the accum contains 2 and that both objectives has been completed by axis
                    	//So we need to set the winner of the round (0 = Axis, 1 = Allies)
                   	wm_setwinner 0
	wait 1500

                    	//End the round
                    	wm_endround
       	}

trigger allied_checkgame // mirrors axis_checkgame
        	{

                    	accum 2 abort_if_not_equal 2
                    	wm_setwinner 1
	wait 1500
                    	wm_endround
       	}

fence
{
spawn
{
}
built final
{
}
decayed final
{
}
death
{
}
}
spawn
{
wait 200
constructible_class 3
constructible_constructxpbonus 10
constructible_destructxpbonus 10
setstate fence_materials invisible
}
built final
{
setstate fence default
setstate fence_materials invisible
}
decayed final
{
setstate fence_materials default
setstate fence invisible
}
death
{
wm_announce “The fence has been destroyed!”
setstate fence_materials default
}
}

THERE IT IS!


(damocles) #9

yep - you’re missing the closing } for the game_manager. So where it says:

trigger allied_checkgame // mirrors axis_checkgame
{

accum 2 abort_if_not_equal 2
wm_setwinner 1
wait 1500
wm_endround
}

it should be like:

trigger allied_checkgame // mirrors axis_checkgame
{

accum 2 abort_if_not_equal 2
wm_setwinner 1
wait 1500
wm_endround
}
}

the extra } will tell the script you are finished with the game_manager and allow you to declare fence as the next section.

You’ll still want to look into that extra } you have in your fence routine though - that’ll be your next error if you don’t fix it.


(kgbdino) #10

if you remove the

fence 
{ 
spawn 
{ 
} 
built final 
{ 
} 
decayed final 
{ 
} 
death 
{ 
} 
}

part of the script it should work only keep the

fence
{
spawn 
{ 
wait 200 
constructible_class 3 
constructible_constructxpbonus 10 
constructible_destructxpbonus 10 
setstate fence_materials invisible 
} 
built final 
{ 
setstate fence default 
setstate fence_materials invisible 
} 
decayed final 
{ 
setstate fence_materials default 
setstate fence invisible 
} 
death 
{ 
wm_announce "The fence has been destroyed!" 
setstate fence_materials default 
} 
}

part of the script regarding the fence and it should work

a script cant work with 2 “scriptname’s”


(kgbdino) #11

LOL “cool” (joke) every body votes yes on that you are an idiot :banana:


(damocles) #12

ah, so spawn is the name of one of your entities? Bit dodgy really - might want to rename that to something other than spawn seeing how spawn is a default event for all entities.


([SSM] Shadow Meat) #13

spawn is one of my entities??? what??? no its not??? ahhh stupid script


(damocles) #14

ok, if spawn is not an entity, then this should work:


game_manager //need a script_multiplayer with scriptname = game manager to autoexec 
{ 
spawn 
{ 
remapshaderflush 

// Game rules 
wm_axis_respawntime 1 //FOR TESTING ONLY! 
wm_allied_respawntime 1 //FOR TESTING ONLY! 
wm_number_of_objectives 2 
wm_set_round_timelimit 30 

// Objectives 
//1: Collect Gold Barrel and drop off 
//2: Collect Gold Phone and drop off 

// Current main objectives for each team (0=Axis, 1=Allies) 
wm_objective_status 1 1 0 
wm_objective_status 1 1 0 
wm_objective_status 2 1 0 
wm_objective_status 2 1 0 


//Accum values 
accum 1 set 0 //Overall Axis status 
accum 2 set 0 //Overall Allied status 

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

// Winner on expiration of round timer (0=Axis, 1=Allies, -1=no winner at expiration) 
wm_setwinner -1 

wait 2000 

// setautospawn "sz1" 1 //Uses name from description field of team_WOLF_objective 
// setautospawn "sz1" 0 

} 

//Objective Flags 

trigger obj1 //Return of Allied Gold and Radar Parts 
{ 
//Set to objective accum to 1 so we know that the objective has been completed 
accum 1 inc 1 

//Call function called checkgame in game_manager to check if the round has been won 
trigger game_manager axis_checkgame 
} 

trigger obj2 //Return of Axis Gold and Radar Parts 
{ 
//Set to objective accum to 1 so we know that the objective has been completed 
accum 2 inc 1 

//Call function called checkgame in game_manager to check if the round has been won 
trigger game_manager allied_checkgame 
} 

trigger axis_checkgame 
{ 
//Here we check if the accum 1 contains 2, 
//if it doesn't then we do not execute the 2 remaining lines 
//in this function but just continue with the game 
accum 1 abort_if_not_equal 2 

//If this line gets executed it means that the accum contains 2 and that both objectives has been completed by axis 
//So we need to set the winner of the round (0 = Axis, 1 = Allies) 
wm_setwinner 0 
wait 1500 

//End the round 
wm_endround 
} 

trigger allied_checkgame // mirrors axis_checkgame 
{ 

accum 2 abort_if_not_equal 2 
wm_setwinner 1 
wait 1500 
wm_endround 
} 
}





fence 
{ 
spawn 
{ 
wait 200 
constructible_class 3 
constructible_constructxpbonus 10 
constructible_destructxpbonus 10 
setstate fence_materials invisible 
} 
built final 
{ 
setstate fence default 
setstate fence_materials invisible 
} 
decayed final 
{ 
setstate fence_materials default 
setstate fence invisible 
} 
death 
{ 
wm_announce "The fence has been destroyed!" 
setstate fence_materials default 
} 
} 


([SSM] Shadow Meat) #15

i havnt actully saorted out this scropt coz i coped it frm anoter map :S wot does this bit mean?: // Objectives
//1: Collect Gold Barrel and drop off
//2: Collect Gold Phone and drop off

// Current main objectives for each team (0=Axis, 1=Allies)
wm_objective_status 1 1 0
wm_objective_status 1 1 0
wm_objective_status 2 1 0
wm_objective_status 2 1 0

//Accum values
accum 1 set 0 //Overall Axis status
accum 2 set 0 //Overall Allied status

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

// Winner on expiration of round timer (0=Axis, 1=Allies, -1=no winner at expiration)
wm_setwinner -1

wait 2000

// setautospawn “sz1” 1 //Uses name from description field of team_WOLF_objective
// setautospawn “sz1” 0

}

//Objective Flags

trigger obj1 //Return of Allied Gold and Radar Parts
{
//Set to objective accum to 1 so we know that the objective has been completed
accum 1 inc 1

//Call function called checkgame in game_manager to check if the round has been won
trigger game_manager axis_checkgame
}

trigger obj2 //Return of Axis Gold and Radar Parts
{
//Set to objective accum to 1 so we know that the objective has been completed
accum 2 inc 1

//Call function called checkgame in game_manager to check if the round has been won
trigger game_manager allied_checkgame
}

trigger axis_checkgame
{
//Here we check if the accum 1 contains 2,
//if it doesn’t then we do not execute the 2 remaining lines
//in this function but just continue with the game
accum 1 abort_if_not_equal 2

//If this line gets executed it means that the accum contains 2 and that both objectives has been completed by axis
//So we need to set the winner of the round (0 = Axis, 1 = Allies)
wm_setwinner 0
wait 1500

//End the round
wm_endround
}

trigger allied_checkgame // mirrors axis_checkgame
{

accum 2 abort_if_not_equal 2
wm_setwinner 1
wait 1500
wm_endround
}
}


([SSM] Shadow Meat) #16

WOOP IT WORKED now how do i make it so wen u get the 2 objectives trough the dyno-able fencu u win the game?


([SSM] Shadow Meat) #17

RIGHT I HAVE A PROBLEM (again)
This fance must be dynoable ONLY! but with 1 qucik shot or stab it breaks!!!
i have the health set to 0.
AND THE DYNO PIC DOESNT APPEAR!
AND THE COSTRUCTION MATERIALS DONT APPEAR!!! HELPP


(Ifurita) #18

I think you need more CAPS. It’s the number of CAPs in the script that dictates what will destroy it. Try searching, there are at least 2 other people who have asked the same question in the past few weeks.


([SSM] Shadow Meat) #19

K