Script error [Solved]
Posted: Sun Aug 19, 2007 10:53 pm
by Master Fionwë
It's probably just me. I'm not finding the issue here, so could someone please point out what's wrong in the script? I keep getting this error, even though I've set it differently several times.
Thanks in advance.
C:\BF2_ModTools\ToolsFL\Bin\luac.exe: ..\..\common\scripts\BOG\BOGc_hunt.lua:153: unexpected symbol near `}'
ERROR[scriptmunge scripts\BOG\BOGc_hunt.lua]:Could not read input file.ERROR[scriptmunge scripts\BOG\BOGc_hunt.lua]:Could not read input file. [continuing]
2 Errors 0 Warnings
ERROR[levelpack mission\BOGc_hunt.req]:Expecting bracket, but none was found.
File : munged\pc\bogc_hunt.script.req(1)...
ucft <--
ERROR[levelpack mission\BOGc_hunt.req]:Expecting bracket, but none was found.
File : munged\pc\bogc_hunt.script.req(1)...
ucft <--
2 Errors 0 Warnings
Hidden/Spoiler:
[code]--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
-- load the gametype script
ScriptCB_DoFile("ObjectiveTDM")
ScriptCB_DoFile("setup_teams")
-- REP Attacking (attacker is always #1)
REP = 1
CIS = 2
-- These variables do not change
ATT = 1
DEF = 2
function ScriptPostLoad()
--force all the human players onto the attacking side
hunt = ObjectiveTDM:New{teamATT = 1, teamDEF = 2, team3 = 3, pointsPerKillATT = 1, pointsPerKillDEF = 1,
pointsPerKill3 = 1,
uberScoreLimit = 250,
textATT = "game.modes.hunt",
textDEF = "game.modes.hunt2",
text3 = "game.modes.hunt3",
multiplayerRules = true, isUberMode = true}
hunt:Start()
hunt.OnStart = function(self)
AddAIGoal(ATT, "Deathmatch", 100)
AddAIGoal(DEF, "Deathmatch", 100)
end
AddDeathRegion("deathregion")
AddDeathRegion("deathregion2")
AddDeathRegion("deathregion3")
AddDeathRegion("deathregion4")
AddDeathRegion("deathregion5")
end
---------------------------------------------------------------------------
-- FUNCTION: ScriptInit
-- PURPOSE: This function is only run once
-- INPUT:
-- OUTPUT:
-- NOTES: The name, 'ScriptInit' is a chosen convention, and each
-- mission script must contain a version of this function, as
-- it is called from C to start the mission.
---------------------------------------------------------------------------
function ScriptInit()
-- Designers, these two lines *MUST* be first.
SetPS2ModelMemory(4100000)
ReadDataFile("ingame.lvl")
SetMemoryPoolSize ("Combo",100) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",1200) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",1300) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Condition",1300) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Attack",1000) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",10000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",100) -- should be ~1x #combo
SetMemoryPoolSize("Music", 36)
SetTeamAggressiveness(CIS, 1.0)
SetTeamAggressiveness(REP, 1.0)
ReadDataFile("sound\\geo.lvl;geo1cw")
ReadDataFile("dc:SIDE\\rep.lvl",
--"rep_bldg_forwardcenter",
"rep_fly_assault_dome",
--"rep_fly_gunship",
"rep_fly_gunship_dome",
"rep_fly_jedifighter_dome",
"rep_fly_jedifighter_sc",
"rep_inf_ep3_sniper",
"rep_inf_ep3_arctrooper",
"rep_hero_macewindu",
"rep_hero_aalya",
"rep_hero_keira",
"rep_hero_kiyadimundi",
"rep_hero_obiwan",
"rep_hero_anakin",
"rep_hero_shaakti",
"rep_hero_yoda",
"rep_hero_plokoon",
"rep_hero_luminara")
ReadDataFile("dc:SIDE\\geo.lvl",
"geo_inf_geonosian",
"geo_inf_acklay")
ReadDataFile("SIDE\\jed.lvl",
"jed_master_02")
ReadDataFile("dc:SIDE\\tur.lvl",
"tur_bldg_geoturret")
-- Level Stats
ClearWalkers()
SetMemoryPoolSize("EntityWalker",
AddWalkerType(0, 3) -- 8 droidekas (special case: 0 leg pairs)
AddWalkerType(2, 2) -- 2 spider walkers with 2 leg pairs each
AddWalkerType(3, 2) -- 2 attes with 3 leg pairs each
SetMemoryPoolSize("Aimer", 120)
SetMemoryPoolSize("AcklayData", 180)
SetMemoryPoolSize("BaseHint", 470)
SetMemoryPoolSize("CommandWalker", 0)
SetMemoryPoolSize("EntityFlyer", 4)
SetMemoryPoolSize("EntityHover", 12)
SetMemoryPoolSize("EntityLight", 50)
SetMemoryPoolSize("MountedTurret", 12)
SetMemoryPoolSize("Obstacle", 700)
SetMemoryPoolSize("PassengerSlot", 2)
SetMemoryPoolSize("PathNode", 100)
SetMemoryPoolSize("TreeGridStack", 830)
SetMemoryPoolSize("SoldierAnimation", 1500)
SetSpawnDelay(10.0, 0.25)
SetupTeams{
rep = {
team = REP,
units = 34,
reinforcements = -1,
soldier = { "rep_hero_obiwan",1},
pilot = { "rep_hero_anakin",1},
assault = {"rep_hero_luminara",1},
sniper = { "rep_hero_shaakti",1},
marine = { "rep_hero_kiyadimundi",1},
engineer = { "rep_hero_aalya",1},
officer = {"rep_hero_macewindu",1},
special = { "rep_hero_plokoon",1},
AddUnitClass(1, "rep_hero_keira",1)
}
}
cis = {
team = CIS,
units = 160,
reinforcements = -1,
soldier = { "geo_inf_geonosian",60},
assault = { "geo_inf_acklay",100}
}
}
-- Local Stats
AddAIGoal(3, "Deathmatch", 100)
SetTeamName(3, "local")
SetUnitCount(3, 160)
AddUnitClass(3, "geo_inf_geonosian", 80)
AddUnitClass(3, "geo_inf_acklay", 80)
SetTeamAsFriend(ATT, DEF)
SetTeamAsFriend(DEF, ATT)
SetTeamAsEnemy(ATT, 3)
SetTeamAsEnemy(3, ATT)
SetTeamAsEnemy(DEF, 3)
SetTeamAsEnemy(3, DEF)
ReadDataFile("dc:BOG\\geo1.lvl", "geo1_hunt")
SetDenseEnvironment("false")
SetMinFlyHeight(-65)
SetMaxFlyHeight(150)
SetMaxPlayerFlyHeight(250)
-- Birdies
--SetNumBirdTypes(1)
--SetBirdType(0.0,10.0,"dragon")
--SetBirdFlockMinHeight(90.0)
-- Sound
voiceSlow = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)
voiceQuick = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_quick")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_quick", voiceQuick)
OpenAudioStream("sound\\global.lvl", "cw_music")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
OpenAudioStream("sound\\geo.lvl", "geo1cw")
OpenAudioStream("sound\\geo.lvl", "geo1cw")
-- SetBleedingVoiceOver(REP, REP, "rep_off_com_report_us_overwhelmed", 1)
-- SetBleedingVoiceOver(REP, CIS, "rep_off_com_report_enemy_losing", 1)
-- SetBleedingVoiceOver(CIS, REP, "cis_off_com_report_enemy_losing", 1)
-- SetBleedingVoiceOver(CIS, CIS, "cis_off_com_report_us_overwhelmed", 1)
-- SetLowReinforcementsVoiceOver(REP, REP, "rep_off_defeat_im", .1, 1)
-- SetLowReinforcementsVoiceOver(REP, CIS, "rep_off_victory_im", .1, 1)
-- SetLowReinforcementsVoiceOver(CIS, CIS, "cis_off_defeat_im", .1, 1)
-- SetLowReinforcementsVoiceOver(CIS, REP, "cis_off_victory_im", .1, 1)
SetOutOfBoundsVoiceOver(1, "repleaving")
SetOutOfBoundsVoiceOver(2, "cisleaving")
SetAmbientMusic(REP, 1.0, "rep_geo_amb_hunt", 0,1)
-- SetAmbientMusic(REP, 0.99, "rep_GEO_amb_middle", 1,1)
-- SetAmbientMusic(REP, 0.1,"rep_GEO_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_geo_amb_hunt", 0,1)
-- SetAmbientMusic(CIS, 0.99, "cis_GEO_amb_middle", 1,1)
-- SetAmbientMusic(CIS, 0.1,"cis_GEO_amb_end", 2,1)
SetVictoryMusic(REP, "rep_geo_amb_victory")
SetDefeatMusic (REP, "rep_geo_amb_defeat")
SetVictoryMusic(CIS, "cis_geo_amb_victory")
SetDefeatMusic (CIS, "cis_geo_amb_defeat")
SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
--SetSoundEffect("WeaponUnableSelect", "com_weap_inf_weaponchange_null")
--SetSoundEffect("WeaponModeUnableSelect", "com_weap_inf_modechange_null")
SetSoundEffect("SpawnDisplayUnitChange", "shell_select_unit")
SetSoundEffect("SpawnDisplayUnitAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplaySpawnPointChange", "shell_select_change")
SetSoundEffect("SpawnDisplaySpawnPointAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplayBack", "shell_menu_exit")
--ActivateBonus(CIS, "SNEAK_ATTACK")
--ActivateBonus(REP, "SNEAK_ATTACK")
SetAttackingTeam(ATT)
--Opening Satalite Shot
--Geo
--Mountain
AddCameraShot(0.996091, 0.085528, -0.022005, 0.001889, -6.942698, -59.197201, 26.136919)
--Wrecked Ship
AddCameraShot(0.906778, 0.081875, -0.411906, 0.037192, 26.373968, -59.937874, 122.553581)
--War Room
AddCameraShot(0.994219, 0.074374, 0.077228, -0.005777, 90.939568, -49.293945, -69.571136)
end[/code]
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
-- load the gametype script
ScriptCB_DoFile("ObjectiveTDM")
ScriptCB_DoFile("setup_teams")
-- REP Attacking (attacker is always #1)
REP = 1
CIS = 2
-- These variables do not change
ATT = 1
DEF = 2
function ScriptPostLoad()
--force all the human players onto the attacking side
hunt = ObjectiveTDM:New{teamATT = 1, teamDEF = 2, team3 = 3, pointsPerKillATT = 1, pointsPerKillDEF = 1,
pointsPerKill3 = 1,
uberScoreLimit = 250,
textATT = "game.modes.hunt",
textDEF = "game.modes.hunt2",
text3 = "game.modes.hunt3",
multiplayerRules = true, isUberMode = true}
hunt:Start()
hunt.OnStart = function(self)
AddAIGoal(ATT, "Deathmatch", 100)
AddAIGoal(DEF, "Deathmatch", 100)
end
AddDeathRegion("deathregion")
AddDeathRegion("deathregion2")
AddDeathRegion("deathregion3")
AddDeathRegion("deathregion4")
AddDeathRegion("deathregion5")
end
---------------------------------------------------------------------------
-- FUNCTION: ScriptInit
-- PURPOSE: This function is only run once
-- INPUT:
-- OUTPUT:
-- NOTES: The name, 'ScriptInit' is a chosen convention, and each
-- mission script must contain a version of this function, as
-- it is called from C to start the mission.
---------------------------------------------------------------------------
function ScriptInit()
-- Designers, these two lines *MUST* be first.
SetPS2ModelMemory(4100000)
ReadDataFile("ingame.lvl")
SetMemoryPoolSize ("Combo",100) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",1200) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",1300) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Condition",1300) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Attack",1000) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",10000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",100) -- should be ~1x #combo
SetMemoryPoolSize("Music", 36)
SetTeamAggressiveness(CIS, 1.0)
SetTeamAggressiveness(REP, 1.0)
ReadDataFile("sound\\geo.lvl;geo1cw")
ReadDataFile("dc:SIDE\\rep.lvl",
--"rep_bldg_forwardcenter",
"rep_fly_assault_dome",
--"rep_fly_gunship",
"rep_fly_gunship_dome",
"rep_fly_jedifighter_dome",
"rep_fly_jedifighter_sc",
"rep_inf_ep3_sniper",
"rep_inf_ep3_arctrooper",
"rep_hero_macewindu",
"rep_hero_aalya",
"rep_hero_keira",
"rep_hero_kiyadimundi",
"rep_hero_obiwan",
"rep_hero_anakin",
"rep_hero_shaakti",
"rep_hero_yoda",
"rep_hero_plokoon",
"rep_hero_luminara")
ReadDataFile("dc:SIDE\\geo.lvl",
"geo_inf_geonosian",
"geo_inf_acklay")
ReadDataFile("SIDE\\jed.lvl",
"jed_master_02")
ReadDataFile("dc:SIDE\\tur.lvl",
"tur_bldg_geoturret")
-- Level Stats
ClearWalkers()
SetMemoryPoolSize("EntityWalker",
AddWalkerType(0, 3) -- 8 droidekas (special case: 0 leg pairs)
AddWalkerType(2, 2) -- 2 spider walkers with 2 leg pairs each
AddWalkerType(3, 2) -- 2 attes with 3 leg pairs each
SetMemoryPoolSize("Aimer", 120)
SetMemoryPoolSize("AcklayData", 180)
SetMemoryPoolSize("BaseHint", 470)
SetMemoryPoolSize("CommandWalker", 0)
SetMemoryPoolSize("EntityFlyer", 4)
SetMemoryPoolSize("EntityHover", 12)
SetMemoryPoolSize("EntityLight", 50)
SetMemoryPoolSize("MountedTurret", 12)
SetMemoryPoolSize("Obstacle", 700)
SetMemoryPoolSize("PassengerSlot", 2)
SetMemoryPoolSize("PathNode", 100)
SetMemoryPoolSize("TreeGridStack", 830)
SetMemoryPoolSize("SoldierAnimation", 1500)
SetSpawnDelay(10.0, 0.25)
SetupTeams{
rep = {
team = REP,
units = 34,
reinforcements = -1,
soldier = { "rep_hero_obiwan",1},
pilot = { "rep_hero_anakin",1},
assault = {"rep_hero_luminara",1},
sniper = { "rep_hero_shaakti",1},
marine = { "rep_hero_kiyadimundi",1},
engineer = { "rep_hero_aalya",1},
officer = {"rep_hero_macewindu",1},
special = { "rep_hero_plokoon",1},
AddUnitClass(1, "rep_hero_keira",1)
}
}
cis = {
team = CIS,
units = 160,
reinforcements = -1,
soldier = { "geo_inf_geonosian",60},
assault = { "geo_inf_acklay",100}
}
}
-- Local Stats
AddAIGoal(3, "Deathmatch", 100)
SetTeamName(3, "local")
SetUnitCount(3, 160)
AddUnitClass(3, "geo_inf_geonosian", 80)
AddUnitClass(3, "geo_inf_acklay", 80)
SetTeamAsFriend(ATT, DEF)
SetTeamAsFriend(DEF, ATT)
SetTeamAsEnemy(ATT, 3)
SetTeamAsEnemy(3, ATT)
SetTeamAsEnemy(DEF, 3)
SetTeamAsEnemy(3, DEF)
ReadDataFile("dc:BOG\\geo1.lvl", "geo1_hunt")
SetDenseEnvironment("false")
SetMinFlyHeight(-65)
SetMaxFlyHeight(150)
SetMaxPlayerFlyHeight(250)
-- Birdies
--SetNumBirdTypes(1)
--SetBirdType(0.0,10.0,"dragon")
--SetBirdFlockMinHeight(90.0)
-- Sound
voiceSlow = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)
voiceQuick = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_quick")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_quick", voiceQuick)
OpenAudioStream("sound\\global.lvl", "cw_music")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
OpenAudioStream("sound\\geo.lvl", "geo1cw")
OpenAudioStream("sound\\geo.lvl", "geo1cw")
-- SetBleedingVoiceOver(REP, REP, "rep_off_com_report_us_overwhelmed", 1)
-- SetBleedingVoiceOver(REP, CIS, "rep_off_com_report_enemy_losing", 1)
-- SetBleedingVoiceOver(CIS, REP, "cis_off_com_report_enemy_losing", 1)
-- SetBleedingVoiceOver(CIS, CIS, "cis_off_com_report_us_overwhelmed", 1)
-- SetLowReinforcementsVoiceOver(REP, REP, "rep_off_defeat_im", .1, 1)
-- SetLowReinforcementsVoiceOver(REP, CIS, "rep_off_victory_im", .1, 1)
-- SetLowReinforcementsVoiceOver(CIS, CIS, "cis_off_defeat_im", .1, 1)
-- SetLowReinforcementsVoiceOver(CIS, REP, "cis_off_victory_im", .1, 1)
SetOutOfBoundsVoiceOver(1, "repleaving")
SetOutOfBoundsVoiceOver(2, "cisleaving")
SetAmbientMusic(REP, 1.0, "rep_geo_amb_hunt", 0,1)
-- SetAmbientMusic(REP, 0.99, "rep_GEO_amb_middle", 1,1)
-- SetAmbientMusic(REP, 0.1,"rep_GEO_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_geo_amb_hunt", 0,1)
-- SetAmbientMusic(CIS, 0.99, "cis_GEO_amb_middle", 1,1)
-- SetAmbientMusic(CIS, 0.1,"cis_GEO_amb_end", 2,1)
SetVictoryMusic(REP, "rep_geo_amb_victory")
SetDefeatMusic (REP, "rep_geo_amb_defeat")
SetVictoryMusic(CIS, "cis_geo_amb_victory")
SetDefeatMusic (CIS, "cis_geo_amb_defeat")
SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
--SetSoundEffect("WeaponUnableSelect", "com_weap_inf_weaponchange_null")
--SetSoundEffect("WeaponModeUnableSelect", "com_weap_inf_modechange_null")
SetSoundEffect("SpawnDisplayUnitChange", "shell_select_unit")
SetSoundEffect("SpawnDisplayUnitAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplaySpawnPointChange", "shell_select_change")
SetSoundEffect("SpawnDisplaySpawnPointAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplayBack", "shell_menu_exit")
--ActivateBonus(CIS, "SNEAK_ATTACK")
--ActivateBonus(REP, "SNEAK_ATTACK")
SetAttackingTeam(ATT)
--Opening Satalite Shot
--Geo
--Mountain
AddCameraShot(0.996091, 0.085528, -0.022005, 0.001889, -6.942698, -59.197201, 26.136919)
--Wrecked Ship
AddCameraShot(0.906778, 0.081875, -0.411906, 0.037192, 26.373968, -59.937874, 122.553581)
--War Room
AddCameraShot(0.994219, 0.074374, 0.077228, -0.005777, 90.939568, -49.293945, -69.571136)
end[/code]
Thanks in advance.