G_Script_Scriptparse() error


(retredmadcat) #1

hey

im trying to make test map with a mirror which can be blown by a dynamite.
the mirror worked and everything, untill i added a script for the dynamite (because the mirror was destroyable by guns etc…)

i did this:

i turned the mirror into a func_explosive with:

scriptname dyno (<- i also tried ‘mirrorblow’ for this )
classname func_explosive
spawnflags 4
type glass
mass 600
targetname t1

then i added a brush with trigger texture and turned it into a trigger_objective_info:

classname trigger_objective_info
spawnflags 2
target t1
track Mirror.

Next i added a ‘script_multiplayer’:

classname script_multiplayer
origin 272 -144 344
scriptname game_manager (i also tried ‘dyno’ (which is also name of map) and ‘mirrorblow’)

this is the script, it’s called ‘dyno.script’ and its in etmain/maps (same as dyno.bsp)

game_manager
{
spawn
{
}
}

mirrorblow
{
spawn
{
wait 200
constructible_class 3
}

death
{
wm_announce "Allies have blown the mirror!"
}
}

Now when i try to run my map (using sv_pure 0 and devmap dyno) i get the following error:

G_Script_Scriptparse(), Error (line 0): ‘{’ found, NAME expected.

dunno what i have wrong? probably something in my script or a scriptname key …


(S14Y3R) #2

Make sure you’re toi has a brush with the Origin texture as part of the Entity. (16x16x16)


(retredmadcat) #3

my trigger_objective_info (i guess thats toi :P) must have a origiin brush? how is that done… just make a brush with origin texture and link it to the toi brush? i dont get it


(nUllSkillZ) #4

Yes, just make a brush and texture it with the origin texture.
Then select both, right click and select “trigger_objective_info”.
Actually all brush entites need origin brushes.


(retredmadcat) #5

ok thnx i will try it now

EDIT
thnx for helping but it didnt solve the problem…
i guess i did it correctly cos the blue “connecting line” is now running from the origin brush to the mirror…

i think my script is the problem as its giving the script error…


(codejockey13) #6

does your script_multiplayer have the scriptname key with a value of game_manager?


(retredmadcat) #7

yes it has…

i now copied the whol code out of radar, because the main gate is exactly like i need it… my code now looks like this:


game_manager
{
	spawn
	{
	}
}

maindoor1 
{
	spawn
	{
		wait 50
		constructible_class	3
	}

	death
	{
		wm_announce "bjahjaha"
	}
}

I changed the targetnames etc of all entities in my map to match those of radar
The mirror now has :

scriptname maindoor1
targetname maindoor1
(and the rest of func_explosive crap)

the main gate in radar has the same.

The trigger_objective_info now has:

target maindoor1
track blalaaaa
targetname maindoor1_trig

the last one is the one im unsure about, it’s copied exactly from radar, but i cant find any trigger with target maindoor1_trig and i cant find it in the script either… i included it just to see what happend but it STILL doenst do anything different… it still comes with the "G_Script_Scriptparse(), Error (line 0): ‘{’ found, NAME expected. " error…

im really clueless, as im pretty sure everything is correct in my map, but the problem might be in my script…
i guess there is a { missing or too much or smth…


(S14Y3R) #8

k, you’re game_manager spawn may be lacking vital info to start a “match”. Try adding:

	spawn
	{
		// Game rules
		wm_axis_respawntime	5
		wm_allied_respawntime	5
		wm_number_of_objectives 1
		wm_set_round_timelimit	30

…maybe make sure their’s no old scripts or bsp’s of the same name in your maps folder :stuck_out_tongue:


(retredmadcat) #9

grr still get the same error…

my script now:


game_manager
{
	spawn
	{
	// Game rules 
	wm_axis_respawntime 5 
	wm_allied_respawntime 5 
	wm_number_of_objectives 1 
	wm_set_round_timelimit 30

	}
}

maindoor1 
{
	spawn
	{
		wait 50
		constructible_class	3
	}

	death
	{
		wm_announce "bjahjaha"
	}
}

i cant find ANYTHING on this error… not in google, not on this forum… damnit :stuck_out_tongue:


(retredmadcat) #10

about the old scripts or bsp’s… i do have a map + script called ‘dyno’ so it starts the same… might that be the prob?!
will try renaming…

EDIT, nope didnt work

EDIT 2

i searched google again and i found something this time…

http://linespeed.net/projects/etpub/browser/src/game/g_script.c?rev=587&format=txt


//===========================================================================
//
// Name:			g_script.c
// Function:		Wolfenstein Entity Scripting
// Programmer:		Ridah
// Tab Size:		4 (real tabs)
//===========================================================================




if ( wantName )
			{
				G_Error( "G_Script_ScriptParse(), Error (line %d): '{' found, NAME expected.
", COM_GetCurrentParseLine() );
			}

i dunno if this is of any help for any of you cos to me it seems the game wants a NAME of something, not a clue what… but cant find it…
my knowledge of scripting is not much but i know that if ( wantName ) might mean that the game executes the line after this if it cant find a name and wants one… :stuck_out_tongue:
but i dont have a clue what name it wants…


(nUllSkillZ) #11

Stupid question:
Is the scriptfile named MAPNAME.script (with MAPNAME = name of your map) and is it located in the maps directory?


(retredmadcat) #12

yes…
the .bsp and .map and all those files are all called “dynotest.xxx” (where xxx = bsp, map, dunno what others)

and after making the script file in wordpad i saved it as - “dynotest.script” - (with “”) and all the files are in wolf ET/etmain/maps


(S14Y3R) #13

http://www.splashdamage.com/index.php?name=pnPHPbb2&file=viewtopic&t=1710&sid=4b155af48372314eeebaff594a0a23fa


(retredmadcat) #14

how is that going to help me?
if you’re refering to the dynamitable objective post, i already read all of it and did exactly as it says… im guessing my dynamite works, but i cant even get in the map because of the script error…