Bot_ScriptParse Error


(ChimTea) #1

Hi,

My friend is currently stuck on his alpha release of his map, he got the error:


I tried to compile, getting the same error.

All I ended up finding 2 results on google. Source code of ai_script.c


                if ( token[0] == '{' || token[0] == '}' ) {
                        G_Error( "Bot_ScriptParse(), Error (line %d): entry identifier expected, '%s' found.
", 1 + COM_GetCurrentParseLine(), token );
                }
      

Full code here

What does this mean? Any workaround?

Regards,


(stealth6) #2

Sounds like you have too many pk3 files in your mapping installation. Are you using a clean install to map?


(ChimTea) #3

Nope,

it’s definetly not that, I would recognise that error.
And I compile other maps without that error. We thought it was the .script

Some ‘{’ that was placed wrong or something, but wasn’t the case (did a quick look though)

game_manager
{
	trigger stolen_case
	{
		wm_setwinner	1
		wait 1500
		wm_endround
	}
        spawn
        {
                // Game rules
                wm_axis_respawntime		30
                wm_allied_respawntime		20
                wm_number_of_objectives		8
                wm_set_round_timelimit		30
                
                // Current main objectives for each team (0=Axis, 1=Allies)
                wm_set_main_objective        1 0
                wm_set_main_objective        1 1

                // 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

                // Set starting spawns
                // The wait command after is VERY IMPORTANT for correct spawns!
                wait 150
                setautospawn        "Forward Bunker Spawn"        0
                setautospawn        "Allied Start"        1
                wait 350
	}
}
truckcase1
{
	spawn
	{
		wait 50
		setstate truckcase1 invisible
	}

	trigger visible
	{
		setstate truckcase1 default

		wm_announce	"^WAllies have secured the Documents Case!"
	}

	trigger invisible
	{
		setstate truckcase1 invisible
	}
}

truckcase1_trans
{
	trigger visible
	{
		setstate truckcase1_trans default
	}

	trigger invisible
	{
		setstate truckcase1_trans invisible
	}
}

truck_exitpoint
{
	death
	{
		wm_objective_status 6 0 2
		wm_objective_status 6 1 1

		trigger game_manager stolen_case
	}
}

case1
{
	trigger captured
	{
		trigger truckcase1 visible
		trigger truckcase1_trans invisible
	}
}
// ================================================
alliedconstruct_1
{
	spawn
	{
		wait 50
		trigger self setup
		constructible_class	2	// 2=Satchel 3=Dyna
	}

	trigger setup
	{
		setstate alliedconstruct_1_materials default	// Crate Models
		setstate alliedconstruct_1_clip default		// Clip brushes
		setstate alliedconstruct_1_flag default
	}

	built final
	{
		setstate alliedconstruct_1_materials invisible	// Crate Models
		setstate alliedconstruct_1_clip invisible	// Clip brushes
		setstate alliedconstruct_1_flag invisible

		wm_announce "Allied Team have built the ramp!"
	}

	decayed final
	{
		trigger self setup
	}

	death
	{
		trigger self setup
		wm_announce "Axis have destroyed the ramp!" 
	}
}
//***Forward spawn and gate***

forwardflag
{
        spawn {
                accum 0 set 0                        // Spawn owner: 0-Axis, 1-Allied
        }


        trigger axis_capture 
{
                accum 0 abort_if_equal 0        //Abort if axis own

                accum 0 set 0
                wm_announce        "The Axis have captured the flag!"
                setautospawn        "Forward Bunker Spawn"        0
                setautospawn        "Allied Start"        1
                alertentity forward_wobj

                // *----------------------------------- vo ------------------------------------------*
                wm_addteamvoiceannounce 0 "axis_bunker_stop"
                wm_addteamvoiceannounce 1 "allies_bunker_capture"
                wm_teamvoiceannounce 0 "axis_bunker_reclaimed"
                wm_teamvoiceannounce 1 "allies_bunker_reclaimed"
                // *---------------------------------------------------------------------------------*
        }

        trigger allied_capture {
                accum 0 abort_if_equal 1        //Abort if allies own

                accum 0 set 1
                wm_announce        "The Allies have captured the flag!"
                setautospawn        "Axis Depot Spawn"        0
                setautospawn        "Forward Bunker Spawn"        1
                alertentity forward_wobj

                // *----------------------------------- vo ------------------------------------------*
                wm_teamvoiceannounce 0 "axis_bunker_captured"
                wm_teamvoiceannounce 1 "allies_bunker_captured"
                wm_removeteamvoiceannounce 0 "axis_bunker_stop"
                wm_removeteamvoiceannounce 1 "allies_bunker_capture"
                // *---------------------------------------------------------------------------------*
        }

        trigger force_allied {
                accum 0 abort_if_equal 1        //Abort if allies own

                accum 0 set 1
                setautospawn        "Axis Depot Spawn"        0
                setautospawn        "Forward Bunker Spawn"        1
                alertentity forward_wobj
                alertentity forwardspawn
        }

        trigger kill {
                remove
        }
}
// ================================================
// ============ NEUTRAL COMMAND POST  ===============
// ================================================

allied_compost_built
{
	spawn
	{
		wait 400
		trigger allied_compost_built setup

		constructible_class 2
	}

	trigger setup
	{
		setchargetimefactor 1 soldier 1
		setchargetimefactor 1 lieutenant 1
		setchargetimefactor 1 medic 1
		setchargetimefactor 1 engineer 1
		setchargetimefactor 1 covertops 1
		sethqstatus 1 0
	}

	buildstart final
	{
		setstate allied_compost_built_model underconstruction
		setstate neutral_compost_closed_clip invisible
		setstate neutral_compost_closed_model invisible
	}

	built final
	{
		setstate allied_compost_built_model default
		setstate neutral_compost_closed_clip invisible
		setstate neutral_compost_closed_model invisible

		trigger allied_compost_built_model enable_allied_features

		enablespeaker allies_compost_sound
	}

	decayed final
	{
		setstate allied_compost_built_model invisible
		setstate neutral_compost_closed_clip default
		setstate neutral_compost_closed_model default
	}

	death
	{
		setstate allied_compost_built_model invisible
		setstate neutral_compost_closed_clip default
		setstate neutral_compost_closed_model default

		trigger allied_compost_built_model disable_allied_features

		disablespeaker allies_compost_sound
	}
}

allied_compost_built_model
{
	spawn
	{
		wait 400
		setstate allied_compost_built_model invisible
	}

	trigger enable_allied_features
	{
		setchargetimefactor 1 soldier 0.75
		setchargetimefactor 1 lieutenant 0.75
		setchargetimefactor 1 medic 0.75
		setchargetimefactor 1 engineer 0.7
		setchargetimefactor 1 covertops 0.75
		sethqstatus 1 1

		wm_announce	"Allied Command Post constructed. Charge speed increased!"

		// *----------------------------------- vo ------------------------------------------*
		wm_teamvoiceannounce 0 "axis_hq_compost_constructed_allies"

		wm_teamvoiceannounce 1 "allies_hq_compost_constructed"

		wm_removeteamvoiceannounce 1 "allies_hq_compost_construct"
		// *---------------------------------------------------------------------------------*

		wm_objective_status 4 0 2
		wm_objective_status 4 1 1
	}

	trigger disable_allied_features
	{
		setchargetimefactor 1 soldier 1
		setchargetimefactor 1 lieutenant 1
		setchargetimefactor 1 medic 1
		setchargetimefactor 1 engineer 1
		setchargetimefactor 1 covertops 1
		sethqstatus 1 0

		wm_announce	"Axis team has destroyed the Allied Command Post!"

		// *----------------------------------- vo ------------------------------------------*
		wm_addteamvoiceannounce 0 "axis_hq_compost_construct"

		wm_addteamvoiceannounce 1 "allies_hq_compost_construct"

		wm_teamvoiceannounce 0 "axis_hq_compost_construct"

		wm_teamvoiceannounce 1 "allies_hq_compost_damaged"
		// *---------------------------------------------------------------------------------*

		wm_objective_status 4 0 0 
		wm_objective_status 4 1 0
	}
}

axis_compost_built
{
	spawn
	{
		wait 400
		trigger axis_compost_built setup

		constructible_class 2
	}

	trigger setup
	{
		setchargetimefactor 0 soldier 1
		setchargetimefactor 0 lieutenant 1
		setchargetimefactor 0 medic 1
		setchargetimefactor 0 engineer 1
		setchargetimefactor 0 covertops 1
		sethqstatus 0 0
	}

	buildstart final
	{
		setstate axis_compost_built_model underconstruction
		setstate neutral_compost_closed_clip invisible
		setstate neutral_compost_closed_model invisible
	}

	built final
	{
		setstate axis_compost_built_model default
		setstate neutral_compost_closed_clip invisible
		setstate neutral_compost_closed_model invisible

		trigger axis_compost_built_model enable_axis_features

		enablespeaker axis_compost_sound
	}

	decayed final
	{
		setstate axis_compost_built_model invisible
		setstate neutral_compost_closed_clip default
		setstate neutral_compost_closed_model default
	}

	death
	{
		setstate axis_compost_built_model invisible
		setstate neutral_compost_closed_clip default
		setstate neutral_compost_closed_model default

		trigger axis_compost_built_model disable_axis_features

		disablespeaker axis_compost_sound
	}
}

axis_compost_built_model
{
	spawn
	{
		wait 400
		setstate axis_compost_built_model invisible
	}

	trigger enable_axis_features
	{
		setchargetimefactor 0 soldier 0.75
		setchargetimefactor 0 lieutenant 0.75
		setchargetimefactor 0 medic 0.75
		setchargetimefactor 0 engineer 0.75
		setchargetimefactor 0 covertops 0.75
		sethqstatus 0 1

		wm_announce	"Axis Command Post constructed. Charge speed and respawntime increased!"

		// *----------------------------------- vo ------------------------------------------*
		wm_teamvoiceannounce 0 "axis_hq_compost_constructed"

		wm_teamvoiceannounce 1 "allies_hq_compost_constructed_axis"

		wm_removeteamvoiceannounce 0 "axis_hq_compost_construct"
		// *---------------------------------------------------------------------------------*

       	 	wm_objective_status 5 0 2
        	wm_objective_status 5 1 1
	}

	trigger disable_axis_features
	{
		setchargetimefactor 0 soldier 1
		setchargetimefactor 0 lieutenant 1
		setchargetimefactor 0 medic 1
		setchargetimefactor 0 engineer 1
		setchargetimefactor 0 covertops 1
		sethqstatus 0 0

		wm_announce	"Allied team has destroyed the Axis Command Post!"

		// *----------------------------------- vo ------------------------------------------*
		wm_addteamvoiceannounce 0 "axis_hq_compost_construct"

		wm_addteamvoiceannounce 1 "allies_hq_compost_construct"

		wm_teamvoiceannounce 0 "axis_hq_compost_damaged"

		wm_teamvoiceannounce 1 "allies_hq_compost_construct"
		// *---------------------------------------------------------------------------------*

        	wm_objective_status 5 0 0
        	wm_objective_status 5 1 0
	}
}
// Allies First Gate
firstgate 
{
	spawn 
	{
                wait 200
                constructible_class 3                        //Dyno only
	}
	death 
	{
                wm_announce "The Allies have breached the First Gate!"
                wm_objective_status 1 0 2
                wm_objective_status 1 1 1      
             // *----------------------------------- vo ------------------------------------------*
                wm_teamvoiceannounce 0 "axis_entrance1_destroyed"     
                wm_teamvoiceannounce 1 "allies_entrance1_destroyed"
		// *---------------------------------------------------------------------------------*
           }
}

//Allies door
alliesdoor {
		spawn {
                wait 200
                constructible_class 3                        //Dyno only
			}
		death {
                wm_announce "The Allies have breached the Door!"
                wm_objective_status 2 0 2
                wm_objective_status 2 1 1 
			// *----------------------------------- vo ------------------------------------------*
                wm_teamvoiceannounce 0 "axis_entrance1_destroyed"     
                wm_teamvoiceannounce 1 "allies_entrance1_destroyed"
			// *---------------------------------------------------------------------------------*
           }
}
//Allies Second Gate
forwardgate {
		spawn {
                wait 200
                constructible_class 3                        //Dyno only
			}

		death {
                trigger forwardflag force_allied        //Switch forward spawn permanently to allies
                trigger forwardflag kill                //Remove flag

                wm_announce "The Allies have breached the Gate!"
                wm_objective_status         3 0 2
                wm_objective_status         3 1 1
                wm_set_main_objective        2 0
                wm_set_main_objective        2 1
                // *----------------------------------- vo ------------------------------------------*
                wm_teamvoiceannounce 0 "axis_entrance1_destroyed"
                wm_removeteamvoiceannounce 0 "axis_entrances_defend"
                wm_removeteamvoiceannounce 0 "axis_bunker_stop"

                wm_teamvoiceannounce 1 "allies_entrance1_destroyed"
                wm_removeteamvoiceannounce 1 "allies_entrances_destroy"
                wm_removeteamvoiceannounce 1 "allies_bunker_capture"
                // *---------------------------------------------------------------------------------*
        }
}

(Micha) #4

Try to set new lines at { stuff. I had a problem like this because the “spawn” and { was on same line.

    spawn {
            accum 0 set 0                        // Spawn owner: 0-Axis, 1-Allied
    }

change to:


        spawn 
       {
                accum 0 set 0                        // Spawn owner: 0-Axis, 1-Allied
        }


        trigger allied_capture 
{
                accum 0 abort_if_equal 1        //Abort if allies own

                accum 0 set 1
                wm_announce        "The Allies have captured the flag!"
                setautospawn        "Axis Depot Spawn"        0
                setautospawn        "Forward Bunker Spawn"        1
                alertentity forward_wobj

                // *----------------------------------- vo ------------------------------------------*
                wm_teamvoiceannounce 0 "axis_bunker_captured"
                wm_teamvoiceannounce 1 "allies_bunker_captured"
                wm_removeteamvoiceannounce 0 "axis_bunker_stop"
                wm_removeteamvoiceannounce 1 "allies_bunker_capture"
                // *---------------------------------------------------------------------------------*
        }

etc.


(Mateos) #5

Supply map has the brackets on the same line, I guess the guy was following an usual coding convention, strange that would cause an issue…


(ChimTea) #6

Well what do you know, it works. So anyone else that is getting this

Don’t do

spawn (
codecodecode
)

But

spawn
(
      codecodecode
}

//Solved