script error


(TIHan) #1

when i launch my map i get an error saying that on line 255 is expecting }… i know wut this means, i have fixed it… but this means that the other scripts that were in it dont work cause its a double line of it… i am trying to make a tank move on spline path and spent about 5 hours doing it…and now this…

heres my script when i get the error:

game_manager
{
	spawn
	{


		wm_axis_respawntime		1
		wm_allied_respawntime		1
		wm_set_round_timelimit		30
		wm_number_of_objectives		1



		accum 0 set 0
		accum 1 set 0


		// Set the round winner:  0 == AXIS, 1 == ALLIED
		wm_setwinner -1 tank_disabler



	}
}

tank_disabler
{
	trigger run
	{
		trigger tank tank_disable
	}
}

tank_enabler
{
	trigger run
	{
		trigger tank tank_enable
	}
}

trigger tank_enable
{
	trigger self stuck_check
	accum 1 abort_if_bitset 3

	accum 4 set 0
	accum 1 bitreset 8
	accum 1 abort_if_bitset 2
	accum 5 abort_if_not_equal 0
	accum 1 abort_if_bitset 7

	trigger self script_lockout
	trigger tank_sound start

	startanimation 55 10 15 nolerp norandom
	wait 666
	startanimation 5 40 15 nolerp noradom
	wait 500
	trigger self tracks_forward
	trigger self script_lockout_stop
	trigger self move
}

trigger tank_disable
{
	accum 4 inc 1
	accum 4 abort_if_less_than 4

	accum 1 bitset 8

	trigger self deathcheck
}

trigger move_check
{
	trigger self stuck_check
	accum 1 abort_if_bitset 3

	trigger self dispatch
}

trigger move
{
	trigger self move_check
	wait 500
	trigger self move
}

trigger dispatch
{
	accum 3 trigger_if_equal 0 tank run_0

	accum 3 trigger_if_equal 133 tank run_133
}

trigger run_0
{
	accum 1 bitset 2
	trigger tank_gun run_0
	followspline 0 spln0 80 wait length -64
	accum 1 bitreset 2

	trigger self run_continue
}

trigger run_incpos
{
	accum 3 inc 1
}

trigger run_continue
{
	trigger self run_incpos
	trigger self deathcheck
	trigger self stopcheck
	trigger self move
}

trigger stuck_check
{
	accum 1 bitreset 3

	trigger self stuck_check_scriptlockout
	trigger self stuck_check_finished
}

trigger stuck_check_finished
{
	accum 3 abort_if_less_than 134
	accum 1 bitset 3
}

trigger stuck_check_scriptlockout
{
	accum 5 abort_if_equal 0
	accum 1 bitset 3
}

trigger stopcheck_setup
{
	accum 1 bitset 6
	accum 1 abort_if_bitset 8
	trigger self stuck_check
	accum 1 abort_if_bitset 3
	accum 1 bitreset 6
}

trigger stopcheck
{
	trigger self stopcheck_setup
	accum 1 abort_if_not_bitset 6
	trigger self script_lockout

	trigger tank_sound stop
	trigger self tracks_stop
	startanimation 45 10 15 nolerp norandom
	wait 666
	startanimation 0 1 15 nolerp norandom
	wait 900

	trigger self script_lockout_stop
	resetscript
}

trigger script_lockout
{
	accum 5 inc 1
}

trigger script_lockout_stop
{
	accum 5 inc -1
}

death
{
	accum 1 bitset 7
}

trigger deathcheck
{
	accum 1 abort_if_not_bitset 7
	accum 1 abort_if_bitset 9
	accum 1 abort_if_bitset 2
	accum 5 abort_if_not_equal 0

	accum 1 bitset 9

	setstate tank_smoke default

	alertentity kill_tank

	trigger self sound_death
	trigger self tracks_stop
	trigger self script_lockout
	trigger self tracks_stop
	startanimation 45 10 15 nolerp norandom
	wait 666
	startanimation 0 1 15 nolerp norandom
	trigger self script_lockout_stop
	resetscript
}

rebirth
{
	accum 1 bitreset 9
	accum 1 bitreset 7

	trigger self script_lockout

	setstate tank_smoke invisible

	trigger tank_sound rebirth
	wait 500

	trigger self script_lockout_stop
}

tank_trigger
{
	spawn
	{
		wait 100
		attachtotag tank tag_turret
	}
}

tank_build
{
	spawn
	{
		wait 100
		attachtotag tank tag_turret
	}
}

tank_fc
{
	spawn
	{
		wait 400
		constructible_class 2
	}

	built final
	{
		alertentity tank
	}

	trigger final_pos
	{
		constructible_constructxpbonus 3
		constructible_destructxpbonus 3
	}
}

what is the problem? if there is any other problem that may mean i’m leaving something out, PLEASE let me know… and check and make sure if i did the tank right for a start, i did this using et level designer reference… and following it…


(TIHan) #2

well :banana: :banana: :banana: the bannas have come to save the day!!! the script up at the top is a total mess up… i have everything to work on my tank now… its the tank from goldrush… the only problem is that when the tank starts moving… u dont hear the sound… i dont know why i checked my script and it has the right code like the one on goldrush… anybody have this problem?


([rD]MrPink) #3

The sound probably doesn’t exist or something… I found that doors have no sound unless I add one myself…


(TIHan) #4

i dont think thats the problem with the tank sound… heres the error i get in the console when the tank is moving and when there no sound

G_Scripting: trigger has unknown name tank_sound

i dont see what the problem is


(chavo_one) #5

In the goldrush map, tank_sound is an info_notnull entity. It is used for scripting purposes only.

From the goldrush script:

tank_sound
{
	trigger start
	{
		trigger tank sound_start
		wait 3400
		trigger tank sound_move
	}

	trigger stop
	{
		trigger tank sound_stop
		wait 1400
		trigger tank sound_idle
	}

	trigger rebirth
	{
		trigger tank sound_rebirth
		wait 1400
		trigger tank sound_idle
	}
}