Page 1 of 1

crash boom bam

Posted: Wed Oct 17, 2007 5:59 pm
by Thunder
hey i got a crash (again)
the LUA
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
ScriptCB_DoFile("setup_teams")
-- load the gametype script
ScriptCB_DoFile("ObjectiveConquest")

local CIS = 1
local REP = 2
-- These variables do not change
local ATT = 1
local DEF = 2
----------------------------------------------------------------------
-- 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 ScriptPostLoad()

EnableSPHeroRules()

--CP SETUP for CONQUEST

cp1 = CommandPost:New{name = "CON_CP1"}
cp2 = CommandPost:New{name = "con_CP1a"}
cp3 = CommandPost:New{name = "CON_CP2"}
cp4 = CommandPost:New{name = "CON_CP5"}
cp5 = CommandPost:New{name = "CON_CP6"}
cp6 = CommandPost:New{name = "CON_CP7"}

conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF, textATT = "game.modes.con", textDEF = "game.modes.con2", multiplayerRules = true}

conquest:AddCommandPost(cp1)
conquest:AddCommandPost(cp2)
conquest:AddCommandPost(cp3)
conquest:AddCommandPost(cp4)
conquest:AddCommandPost(cp5)
conquest:AddCommandPost(cp6)

conquest:Start()
DisableBarriers("Barrier445");
end
function ScriptInit()
-- Designers, these two lines *MUST* be first!
StealArtistHeap(1228*1024)
SetPS2ModelMemory(4380000)
ReadDataFile("ingame.lvl")

-- Republic Attacking (attacker is always #1)

SetTeamAggressiveness(REP, 0.95)
SetTeamAggressiveness(CIS, 0.95)

ReadDataFile("sound\\uta.lvl;uta1cw")

ReadDataFile("dc:SIDE\\rep.lvl",
"rep_inf_ep3_rifleman",
"rep_inf_ep3_rocketeer",
"rep_inf_ep3_engineer",
"rep_inf_ep3_sniper",
"rep_inf_clone_assassin",
"rep_inf_ep3_officer",
"rep_inf_ep3_jettrooper",
"rep_fly_anakinstarfighter_sc",
"rep_hero_obiwan",
"rep_walk_oneman_atst")

ReadDataFile("dc:SIDE\\fal.lvl",
"all_fly_falcon")

ReadDataFile("SIDE\\cis.lvl",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_engineer",
"cis_inf_sniper",
"cis_inf_officer",
"cis_inf_droideka",
"cis_hero_grievous",
"cis_hover_aat")

SetupTeams{
rep = {
team = REP,
units = 32,
reinforcements = 150,
soldier = { "rep_inf_ep3_rifleman", 9, 25},
assault = { "rep_inf_ep3_rocketeer",1, 4},
engineer = { "rep_inf_ep3_engineer",1, 4},
sniper = { "rep_inf_ep3_sniper",1, 4},
officer = { "rep_inf_ep3_officer",1, 4},
special = { "rep_inf_ep3_jettrooper",1, 4},

},
cis = {
team = CIS,
units = 32,
reinforcements = 150,
soldier = { "cis_inf_rifleman", 9, 25},
assault = { "cis_inf_rocketeer",1, 4},
engineer = { "cis_inf_engineer",1, 4},
sniper = { "cis_inf_sniper",1, 4},
officer = { "cis_inf_officer",1, 4},
special = { "cis_inf_droideka",1, 4},
}
}

SetHeroClass(REP, "rep_inf_clone_assassin")
SetHeroClass(CIS, "cis_hero_grievous")

AddUnitClass(REP, "rep_hero_obiwan",1,0)

-- Level Stats
ClearWalkers()
AddWalkerType(0, 2) -- droidekas
AddWalkerType(1, 5) -- ATRTa (special case: 0 leg pairs)
local weaponCnt = 220
SetMemoryPoolSize("Aimer", 36)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 200)
SetMemoryPoolSize("Combo::DamageSample", 610)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityHover",6)
SetMemoryPoolSize("EntityLight", 60)
SetMemoryPoolSize("EntityFlyer", 8)
SetMemoryPoolSize("EntitySoundStream", 8)
SetMemoryPoolSize("EntitySoundStatic", 27)
SetMemoryPoolSize("MountedTurret", 2)
SetMemoryPoolSize("Navigator", 40)
SetMemoryPoolSize("Obstacle", 400)
SetMemoryPoolSize("PathFollower", 40)
SetMemoryPoolSize("PathNode", 150)
SetMemoryPoolSize("TentacleSimulator", 0)
SetMemoryPoolSize("TreeGridStack", 225)
SetMemoryPoolSize("UnitAgent", 40)
SetMemoryPoolSize("UnitController", 40)
SetMemoryPoolSize("Weapon", weaponCnt)

SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:UT1\\uta1.lvl", "uta1_Conquest")
AddDeathRegion("deathregion")
SetDenseEnvironment("false")
SetMaxFlyHeight(29.5)
SetMaxPlayerFlyHeight(29.5)


-- Sound Stats

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\\uta.lvl", "uta1")
OpenAudioStream("sound\\uta.lvl", "uta1")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
-- OpenAudioStream("sound\\uta.lvl", "uta1_emt")

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(2, "Repleaving")
SetOutOfBoundsVoiceOver(1, "Cisleaving")

SetAmbientMusic(REP, 1.0, "rep_uta_amb_start", 0,1)
SetAmbientMusic(REP, 0.8, "rep_uta_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2, "rep_uta_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_uta_amb_start", 0,1)
SetAmbientMusic(CIS, 0.8, "cis_uta_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.2, "cis_uta_amb_end", 2,1)

SetVictoryMusic(REP, "rep_uta_amb_victory")
SetDefeatMusic (REP, "rep_uta_amb_defeat")
SetVictoryMusic(CIS, "cis_uta_amb_victory")
SetDefeatMusic (CIS, "cis_uta_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")

-- Camera Stats - Utapau: Sinkhole
AddCameraShot(-0.428091, 0.045649, -0.897494, -0.095703, 162.714951, 45.857063, 40.647118)
AddCameraShot(-0.194861, -0.001600, -0.980796, 0.008055, -126.179787, 16.113789, 70.012894);
AddCameraShot(-0.462548, -0.020922, -0.885442, 0.040050, -16.947638, 4.561796, 156.926956);
AddCameraShot(0.995310, 0.024582, -0.093535, 0.002310, 38.288612, 4.561796, 243.298508);
AddCameraShot(0.827070, 0.017093, 0.561719, -0.011609, -24.457638, 8.834146, 296.544586);
AddCameraShot(0.998875, 0.004912, -0.047174, 0.000232, -45.868237, 2.978215, 216.217880);


end
Error Code
Hidden/Spoiler:
C:\BF2_ModTools\data_UT1\_BUILD\..\..\ToolsFL\Bin\luac.exe: ..\..\common\scripts\UT1\UT1c_con.lua:114: `)' expected near `,'
ERROR[scriptmunge scripts\UT1\UT1c_con.lua]:Could not read input file.ERROR[scriptmunge scripts\UT1\UT1c_con.lua]:Could not read input file. [continuing]
2 Errors 0 Warnings

ERROR[levelpack mission\UT1c_con.req]:Expecting bracket, but none was found.
File : munged\pc\ut1c_con.script.req(1)...

ucft <--
ERROR[levelpack mission\UT1c_con.req]:Expecting bracket, but none was found.
File : munged\pc\ut1c_con.script.req(1)...

ucft <--
[continuing]
2 Errors 0 Warnings

WARNING[PC_modelmunge msh\rep_inf_jettrooper.msh]:rep_inf_jettrooper has 2379 vertices and NO COLLISION GEOMETRY (WILL BE SLOW)!
WARNING[PC_modelmunge msh\rep_walk_atte.msh]:SplitSkinnedSegments: WARNING: out of space in splitting catalog!
WARNING[PC_modelmunge msh\rep_walk_atte.msh]:SplitSkinnedSegments: WARNING: resorting to brute force, this may take a while...
WARNING[PC_modelmunge msh\rep_walk_atte.msh]:SplitSkinnedSegments: WARNING: out of space in splitting catalog!
WARNING[PC_modelmunge msh\rep_walk_atte.msh]:SplitSkinnedSegments: WARNING: resorting to brute force, this may take a while...
WARNING[PC_modelmunge msh\all_inf_luke.msh]:all_inf_luke has 1171 vertices and NO COLLISION GEOMETRY (WILL BE SLOW)!
WARNING[PC_modelmunge msh\rep_inf_aaylasecura.msh]:SplitSkinnedSegments: WARNING: out of space in splitting catalog!
WARNING[PC_modelmunge msh\rep_inf_aaylasecura.msh]:Mesh rep_inf_aaylasecura segment sv_aaylasecura vertex 6 has invalid weight[0]=1.000169.
WARNING[PC_modelmunge msh\rep_inf_aaylasecura.msh]:rep_inf_aaylasecura has 1597 vertices and NO COLLISION GEOMETRY (WILL BE SLOW)!
WARNING[PC_modelmunge msh\rep_inf_aaylasecura.msh]:Mesh rep_inf_aaylasecura segment sv_aaylasecura vertex 6 has invalid weight[0]=1.000169.
WARNING[PC_modelmunge msh\rep_inf_arctrooper.msh]:rep_inf_arctrooper has 2031 vertices and NO COLLISION GEOMETRY (WILL BE SLOW)!
WARNING[PC_modelmunge msh\rep_inf_clonecommander.msh]:rep_inf_clonecommander has 1560 vertices and NO COLLISION GEOMETRY (WILL BE SLOW)!
WARNING[PC_modelmunge msh\rep_inf_clone_assassin.msh]:rep_inf_clone_assassin has 1963 vertices and NO COLLISION GEOMETRY (WILL BE SLOW)!
WARNING[PC_modelmunge msh\rep_inf_ep3anakin.msh]:rep_inf_ep3anakin has 2900 vertices and NO COLLISION GEOMETRY (WILL BE SLOW)!
WARNING[PC_modelmunge msh\rep_inf_ep3armoredpilot.msh]:rep_inf_ep3armoredpilot has 2193 vertices and NO COLLISION GEOMETRY (WILL BE SLOW)!
WARNING[PC_modelmunge msh\rep_inf_ep3cloakedanakin.msh]:rep_inf_ep3cloakedanakin has 3896 vertices and NO COLLISION GEOMETRY (WILL BE SLOW)!
WARNING[PC_modelmunge msh\rep_inf_ep3heavytrooper.msh]:rep_inf_ep3heavytrooper has 2280 vertices and NO COLLISION GEOMETRY (WILL BE SLOW)!
WARNING[PC_modelmunge msh\rep_inf_ep3jettrooper.msh]:rep_inf_ep3jettrooper has 2368 vertices and NO COLLISION GEOMETRY (WILL BE SLOW)!
WARNING[PC_modelmunge msh\rep_inf_ep3obiwan.msh]:rep_inf_ep3obiwan has 2936 vertices and NO COLLISION GEOMETRY (WILL BE SLOW)!
WARNING[PC_modelmunge msh\rep_inf_ep3sniper.msh]:rep_inf_ep3sniper has 4737 vertices and NO COLLISION GEOMETRY (WILL BE SLOW)!
WARNING[PC_modelmunge msh\rep_inf_ep3spacepilot.msh]:rep_inf_ep3spacepilot has 1797 vertices and NO COLLISION GEOMETRY (WILL BE SLOW)!
WARNING[PC_modelmunge msh\rep_inf_ep3trooper.msh]:rep_inf_ep3trooper has 1963 vertices and NO COLLISION GEOMETRY (WILL BE SLOW)!
WARNING[PC_modelmunge msh\rep_inf_feluciatrooper.msh]:rep_inf_feluciatrooper has 1364 vertices and NO COLLISION GEOMETRY (WILL BE SLOW)!
WARNING[PC_modelmunge msh\rep_inf_kiadimundi.msh]:rep_inf_kiadimundi has 1713 vertices and NO COLLISION GEOMETRY (WILL BE SLOW)!
WARNING[PC_modelmunge msh\rep_inf_luke.msh]:rep_inf_luke has 1171 vertices and NO COLLISION GEOMETRY (WILL BE SLOW)!
WARNING[PC_modelmunge msh\rep_inf_macewindu.msh]:rep_inf_macewindu has 2866 vertices and NO COLLISION GEOMETRY (WILL BE SLOW)!
WARNING[PC_modelmunge msh\rep_inf_pilot.msh]:rep_inf_pilot has 2418 vertices and NO COLLISION GEOMETRY (WILL BE SLOW)!
WARNING[PC_modelmunge msh\rep_inf_pilot_low1.msh]:rep_inf_pilot_low1 has 1060 vertices and NO COLLISION GEOMETRY (WILL BE SLOW)!
WARNING[PC_modelmunge msh\rep_inf_trooper.msh]:rep_inf_trooper has 1807 vertices and NO COLLISION GEOMETRY (WILL BE SLOW)!
WARNING[PC_modelmunge msh\rep_inf_yoda.msh]:rep_inf_yoda has 2283 vertices and NO COLLISION GEOMETRY (WILL BE SLOW)!
WARNING[PC_modelmunge msh\rep_walk_oneman_atst.msh]:SplitSkinnedSegments: WARNING: out of space in splitting catalog!
WARNING[PC_modelmunge msh\rep_walk_oneman_atst.msh]:SplitSkinnedSegments: WARNING: resorting to brute force, this may take a while...
WARNING[PC_modelmunge msh\rep_walk_oneman_atst.msh]:SplitSkinnedSegments: WARNING: out of space in splitting catalog!
WARNING[PC_modelmunge msh\rep_walk_oneman_atst.msh]:SplitSkinnedSegments: WARNING: out of space in splitting catalog!
WARNING[PC_modelmunge msh\rep_walk_oneman_atst.msh]:SplitSkinnedSegments: WARNING: resorting to brute force, this may take a while...
WARNING[PC_modelmunge msh\rep_weap_inf_chaingun.msh]:rep_weap_inf_chaingun has 1178 vertices and NO COLLISION GEOMETRY (WILL BE SLOW)!
0 Errors 36 Warnings

WARNING[PC_modelmunge msh\uta1_bldg_rep_ground.msh]:uta1_bldg_rep_ground has 1064 vertices and NO COLLISION GEOMETRY (WILL BE SLOW)!
0 Errors 1 Warnings

Re: crash boom bam

Posted: Wed Oct 17, 2007 8:32 pm
by Bac-Talan
Well...

I'm not going to read your lua, because I have no idea what I'm looking for.
Honestly, we need more information, when does this happen, what did you change before it started crashing, stuff like that.

From about a five second glance at your error code, I can tell you that you don't have the syntax right somewhere. Go through, compare it to a shipped Lua if you have to, and look for stuff like missing parenthesis, brackets, periods, commas, etc.

And remember, the community isn't your personal bug checker. Run the BFII_Modtools.exe or whatever bug checker, (download the server fix if you have the dvd version like me) and give us those errors, that helps. Really, try and solve it yourself, you'll learn more that way, but if you have a problem you just can't fix, then come to us.

Re: crash boom bam

Posted: Wed Oct 17, 2007 9:22 pm
by Teancum

Code: Select all

C:\BF2_ModTools\data_UT1\_BUILD\..\..\ToolsFL\Bin\luac.exe: ..\..\common\scripts\UT1\UT1c_con.lua:[b]114[/b]: `)' expected near `,'
Go to line 114 in your lua. You typed something wrong.

Re: crash boom bam

Posted: Wed Oct 17, 2007 9:34 pm
by Frisbeetarian
It looks like line 114 has to do with Obi-Wan. Though nothing appears wrong in this line, could something outside of the lua relating to Obi-Wan be the problem (such as a "bracket" issue).

Re: crash boom bam

Posted: Thu Oct 18, 2007 11:05 am
by Caleb1117
Wait... whats this?
SetHeroClass(REP, "rep_inf_clone_assassin")
SetHeroClass(CIS, "cis_hero_grievous")

AddUnitClass(REP, "rep_hero_obiwan",1,0)
AFAIK, thats not a valid location for the AddUnitClass.
Are you trying to add Obi to the CIS side?

Re: crash boom bam

Posted: Thu Oct 18, 2007 11:29 am
by Bantha55
AddUnitClass(REP, "rep_hero_obiwan",1,0)

um...you have written :,1,0
the second number says how many obiwans are running around maximal so you should write :,1,1

Re: crash boom bam

Posted: Thu Oct 18, 2007 11:47 am
by Maveritchell
Caleb1117 wrote:Wait... whats this?
SetHeroClass(REP, "rep_inf_clone_assassin")
SetHeroClass(CIS, "cis_hero_grievous")

AddUnitClass(REP, "rep_hero_obiwan",1,0)
AFAIK, thats not a valid location for the AddUnitClass.
Are you trying to add Obi to the CIS side?
That line can be added almost anywhere in the .lua and work.

Re: crash boom bam

Posted: Fri Oct 19, 2007 7:39 am
by Thunder
Bantha55 wrote:AddUnitClass(REP, "rep_hero_obiwan",1,0)

um...you have written :,1,0
the second number says how many obiwans are running around maximal so you should write :,1,1
aight that fixed the LUA problem but new one here
after i munge and put in addon then fun swbf2 and try the map well i can't even acsese the map without crashing before the profiles
i toke it out of addon and swbf2 worked again but there is something wrong

Re: crash boom bam

Posted: Fri Oct 19, 2007 10:41 am
by FragMe!
How many maps do you have in your add on folder? There is a 50 something limit to the amount of addon maps

Re: crash boom bam

Posted: Fri Oct 19, 2007 10:44 am
by FOOLIS
the limit is 56 i think

Re: crash boom bam

Posted: Fri Oct 19, 2007 2:00 pm
by Thunder
lol i have 59 and i just put another map called Dantoonine: 97th Strike
that i am working on and it did not crash the game so its the map not AddOn