Linked Turret = Fatal Crash

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

EGG_GUTS
Master Bounty Hunter
Master Bounty Hunter
Posts: 1626
Joined: Thu Dec 07, 2006 7:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: CANADA!

Linked Turret = Fatal Crash

Post by EGG_GUTS »

Ok so I'm trying out Linked turrets follow the tut and I get a fatal error, can some one help me fix it?

The BF2 Log
Hidden/Spoiler:
Opened logfile BFront2.log 2007-12-31 1527
ingame stream movies\crawl.mvs
prev = none iLastPage = nil
prev = texture iLastPage = 1
prev = texture iLastPage = 2
prev = texture iLastPage = 3
ifs_legal.Exit

Message Severity: 2
.\Source\GameMovie.cpp(399)
Unable to find open movie segment shell_main

ifs_saveop_DoOps LoadFileList
ifs_saveop_DoOps LoadFileList
ifs_saveop_DoOps LoadProfile
ifs_saveop_DoOps LoadProfile
num, Selection = 1 table: 0401E7D0
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 1
EraSelection.subst = c era_c
play movie JN1 200 , 300 510 x 400

Message Severity: 2
.\Source\GameMovie.cpp(399)
Unable to find open movie segment JN10.000000ly

+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 2
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 3
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 4
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 5
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 6
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 8
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 9
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 11
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 14
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 17
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 19
EraSelection.subst = c era_c
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 20
EraSelection.subst = c era_c
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 21
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 25
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 26
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 27
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 29
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 32
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 34
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 55
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 77
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 71
EraSelection.subst = c era_c
EraSelection.subst = g era_g
EraSelection.subst = c era_c
EraSelection.subst = g era_g
num, Selection = 1 table: 0401E7D0
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 59
EraSelection.subst = g era_g
play movie JN1 200 , 300 510 x 400

Message Severity: 2
.\Source\GameMovie.cpp(399)
Unable to find open movie segment JN10.000000ly

this.CurButton = nil
cur_button = nil
bEra_CloneWar = 1 bEra_Galactic = 1
clonewar_visable = false galactic_visable = true
Adding map: BODg_Diet Dr. Pepper idx: 1
this.CurButton = _map_add
cur_button = nil
this.CurButton = Launch
cur_button = nil

Message Severity: 3
.\Source\LoadUtil.cpp(1010)
Data in C:\Program Files\LucasArts\Star Wars Battlefront II\GameData\AddOn\BOD\Data\_lvl_pc\MISSION.lvl is not a binary UCF file.

Message Severity: 3
.\Source\LoadUtil.cpp(1019)
Unable to find level chunk in MISSION.lvl


Message Severity: 3
.\Source\LuaHelper.cpp(112)
OpenScript(BODg_Diet Dr. Pepper): script (47f599dd) not found

Message Severity: 5
.\Source\GameState.cpp(1283)
Could not open MISSION\BODg_Diet Dr. Pepper.lvl
Munge Log
Hidden/Spoiler:
C:\BF2_ModTools\ToolsFL\Bin\luac.exe: ..\..\common\scripts\BOD\BODg_cmn.lua:128: unexpected symbol near ` '
ERROR[scriptmunge scripts\BOD\BODg_cmn.lua]:Could not read input file.ERROR[scriptmunge scripts\BOD\BODg_cmn.lua]:Could not read input file. [continuing]
2 Errors 0 Warnings

ERROR[levelpack mission\BODg_Diet Dr. Pepper.req]:Expecting bracket, but none was found.
File : munged\pc\bodg_cmn.script.req(1)...

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

ucft <--

2 Errors 0 Warnings

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

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

ucft <--
[continuing]
2 Errors 0 Warnings
My Lua
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
-- SPA9 - Naboo
-- Common script that shares all setup information
--

ScriptCB_DoFile("setup_teams")
ScriptCB_Dofile("LinkedFrigate")

-- Republic Attacking (attacker is always #1)
ALL = 1
IMP = 2
-- These variables do not change
ATT = 1
DEF = 2

function SetupUnits()
ReadDataFile("dc:SIDE\\all.lvl",
"all_inf_pilot",
"all_inf_marine",
"all_inf_duros",
"all_inf_pilotfemale",
"all_fly_xwing_sc",
"all_droid_r2d2",
"all_inf_officer",
"all_hero_chewbacca",
"all_inf_sullust",
"all_fly_ywing_sc",
"all_fly_awing",
"all_fly_gunship_sc",
"all_veh_remote_terminal")
ReadDataFile("dc:SIDE\\imp.lvl",
"imp_inf_pilot",
"imp_inf_marine",
"imp_inf_engineer",
"imp_inf_rifleman",
"imp_inf_officer_gray",
"imp_inf_scanner",
"imp_inf_rocketeer",
"imp_fly_tiefighter_sc",
"imp_fly_tiebomber_sc",
"imp_fly_tieinterceptor",
"imp_fly_trooptrans",
"imp_veh_remote_terminal")

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

ReadDataFile("dc:SIDE\\vehicles.lvl",
"all_fly_kwing",
"all_fly_bwing",
"imp_fly_tiedefender",
"imp_fly_tiephantom")

ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_spa_all_beam",
"tur_bldg_spa_all_recoilless",
"tur_bldg_spa_all_chaingun",
"tur_bldg_spa_imp_beam",
"tur_bldg_spa_imp_recoilless",
"tur_bldg_spa_imp_chaingun",
"tur_bldg_chaingun_roof"
)
end

myTeamConfig = {
all = {
team = ALL,
units = 32,
reinforcements = -1,
pilot = { "all_inf_pilot",6},
marine = { "all_inf_marine",4},
},

imp = {
team = IMP,
units = 32,
reinforcements = -1,
pilot = { "imp_inf_pilot",10},
marine = { "imp_inf_marine",6},
}
}

ScriptCB_DoFile("LinkedTurrets")
function SetupTurrets()
--ALL turrets
turretLinkageALL = LinkedTurrets:New{ team = ALL, mainframe = "all-defense",
turrets = {"all_turr_1", "all_turr_2", "all_turr_3", "all_turr_4", "all_turr_5", "all_turr_6"} }
turretLinkageALL:Init()

function turretLinkageALL:OnDisableMainframe()
ShowMessageText("level.spa.hangar.mainframe.atk.down", IMP)
ShowMessageText("level.spa.hangar.mainframe.def.down", ALL)

BroadcastVoiceOver( "IOSMP_obj_20", IMP )
BroadcastVoiceOver( "AOSMP_obj_21", ALL )
end
function turretLinkageALL:OnEnableMainframe()
ShowMessageText("level.spa.hangar.mainframe.atk.up", IMP)
ShowMessageText("level.spa.hangar.mainframe.def.up", ALL)

BroadcastVoiceOver( "IOSMP_obj_22", IMP )
BroadcastVoiceOver( "AOSMP_obj_23", ALL )
end

--IMP turrets
turretLinkageIMP = LinkedTurrets:New{ team = IMP, mainframe = "imp-defense",
turrets = {"imp_turr_1", "imp_turr_2", "imp_turr_3", "imp_turr_4", "imp_turr_5", "imp_turr_6"} }
turretLinkageIMP:Init()

function turretLinkageIMP:OnDisableMainframe()
ShowMessageText("level.spa.hangar.mainframe.atk.down", ALL)
ShowMessageText("level.spa.hangar.mainframe.def.down", IMP)

BroadcastVoiceOver( "IOSMP_obj_21", IMP )
BroadcastVoiceOver( "AOSMP_obj_20", ALL )
end
function turretLinkageIMP:OnEnableMainframe()
ShowMessageText("level.spa.hangar.mainframe.atk.up", ALL)
ShowMessageText("level.spa.hangar.mainframe.def.up", IMP)

BroadcastVoiceOver( "IOSMP_obj_23", IMP )
BroadcastVoiceOver( "AOSMP_obj_22", ALL )
end
end

--Imp Frigates
local impfrig1list = {"imp_turr_79", "imp_turr_80", "imp_turr_81", "imp_turr_82", "imp_turr_83", "imp_turr_84" }
ImpFrigate1 = LinkedFrigate:New{TurretList = impfrig1list, Frigate = "imp-frigate"}
ImpFrigate1:Init()

-- adjust extents to fit cap ship
function ScriptPreInit()
SetWorldExtents(2650)
ScriptPreInit = nil
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, this line *MUST* be first!
ReadDataFile("ingame.lvl")

--tell the game to load our loading image
ReadDataFile("dc:Load\\common.lvl")


SetMinFlyHeight(-1800)
SetMaxFlyHeight(3000)
SetMinPlayerFlyHeight(-1800)
SetMaxPlayerFlyHeight(3000)
SetAIVehicleNotifyRadius(100)

ReadDataFile("sound\\spa.lvl;spa1gcw")
ScriptCB_SetDopplerFactor(0.4)
ScaleSoundParameter("tur_weapons", "MinDistance", 3.0);
ScaleSoundParameter("tur_weapons", "MaxDistance", 3.0);
ScaleSoundParameter("tur_weapons", "MuteDistance", 3.0);
ScaleSoundParameter("Ordnance_Large", "MinDistance", 3.0);
ScaleSoundParameter("Ordnance_Large", "MaxDistance", 3.0);
ScaleSoundParameter("Ordnance_Large", "MuteDistance", 3.0);
ScaleSoundParameter("explosion", "MaxDistance", 5.0);
ScaleSoundParameter("explosion", "MuteDistance", 5.0);

SetupUnits()
SetupTeams(myTeamConfig)

AddUnitClass(IMP, "imp_inf_engineer",3)
AddUnitClass(IMP, "imp_inf_rifleman",5)
AddUnitClass(IMP, "imp_inf_scanner",4)
AddUnitClass(IMP, "imp_inf_officer_gray",2)
AddUnitClass(IMP, "imp_inf_rocketeer",2)

AddUnitClass(ALL, "all_inf_duros",6)
AddUnitClass(ALL, "all_inf_pilotfemale",6)
AddUnitClass(ALL, "all_droid_r2d2",6)
AddUnitClass(ALL, "all_inf_officer",3)
AddUnitClass(ALL, "all_hero_chewbacca",1)

-- Level Stats
ClearWalkers()
local weaponCnt = 250
local guyCnt = 32
SetMemoryPoolSize("Aimer", 190)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 89)
SetMemoryPoolSize("Combo::DamageSample", 0)
SetMemoryPoolSize("CommandFlyer", 3)
SetMemoryPoolSize("SoldierAnimation", 180)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 0)
SetMemoryPoolSize("EntityDroid", 0)
SetMemoryPoolSize("EntityDefenseGridTurret", 0)
SetMemoryPoolSize("EntityFlyer", 32)
SetMemoryPoolSize("EntityLight", 115)
SetMemoryPoolSize("EntityRemoteTerminal", 12)
SetMemoryPoolSize("FLEffectObject::OffsetMatrix", 180)
SetMemoryPoolSize("MountedTurret", 56)
SetMemoryPoolSize("EntityPortableTurret", 20)
SetMemoryPoolSize("Navigator", guyCnt)
SetMemoryPoolSize("Obstacle", 135)
SetMemoryPoolSize("PathNode", 80)
SetMemoryPoolSize("PathFollower", guyCnt)
SetMemoryPoolSize("TentacleSimulator", 0)
SetMemoryPoolSize("TreeGridStack", 240)
SetMemoryPoolSize("UnitAgent", 65) -- guyCnt*2
SetMemoryPoolSize("UnitController", 65)
SetMemoryPoolSize("Weapon", weaponCnt)

SetSpawnDelay(10.0, 0.25)

-- do any pool allocations, custom loading here
if myScriptInit then
myScriptInit()
myScriptInit = nil
end

ReadDataFile("dc:BOD\\spa_sky.lvl", "dag")

ReadDataFile("dc:BOD\\BOD.lvl", myGameMode)

SetDenseEnvironment("false")

SetParticleLODBias(15000)

-- Sound Stats
local voiceSlow = OpenAudioStream("sound\\global.lvl", "spa1_objective_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "all_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "imp_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)

local voiceQuick = OpenAudioStream("sound\\global.lvl", "imp_unit_vo_quick")
AudioStreamAppendSegments("sound\\global.lvl", "all_unit_vo_quick", voiceQuick)

-- OpenAudioStream("sound\\spa.lvl", "spa1_objective_vo_slow")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
OpenAudioStream("sound\\global.lvl", "gcw_music")
OpenAudioStream("sound\\spa.lvl", "spa")
OpenAudioStream("sound\\spa.lvl", "spa")

SetBleedingVoiceOver(ALL, ALL, "all_off_com_report_us_overwhelmed", 1)
SetBleedingVoiceOver(ALL, IMP, "all_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(IMP, ALL, "imp_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(IMP, IMP, "imp_off_com_report_us_overwhelmed", 1)

SetLowReinforcementsVoiceOver(ALL, ALL, "all_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(ALL, IMP, "all_off_victory_im", .1, 1)
SetLowReinforcementsVoiceOver(IMP, IMP, "imp_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(IMP, ALL, "imp_off_victory_im", .1, 1)

SetOutOfBoundsVoiceOver(ALL, "allleaving")
SetOutOfBoundsVoiceOver(IMP, "impleaving")

SetAmbientMusic(ALL, 1.0, "all_spa_amb_start", 0,1)
SetAmbientMusic(ALL, 0.99, "all_spa_amb_middle", 1,1)
SetAmbientMusic(ALL, 0.1,"all_spa_amb_end", 2,1)
SetAmbientMusic(IMP, 1.0, "imp_spa_amb_start", 0,1)
SetAmbientMusic(IMP, 0.99, "imp_spa_amb_middle", 1,1)
SetAmbientMusic(IMP, 0.1,"imp_spa_amb_end", 2,1)

SetVictoryMusic(ALL, "all_spa_amb_victory")
SetDefeatMusic (ALL, "all_spa_amb_defeat")
SetVictoryMusic(IMP, "imp_spa_amb_victory")
SetDefeatMusic (IMP, "imp_spa_amb_defeat")

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
-- SetSoundEffect("BirdScatter", "birdsFlySeq1")
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
SetAttackingTeam(IMP)
-- Internal Alliance hangar
-- this shot is bad, needs to be fixed
AddCameraShot(-0.049495, 0.003922, -0.995646, -0.078892, 24.992880, -22.995819, -1025.940186);
--Flag shot
AddCameraShot(0.546201, 0.047743, 0.833116, -0.072822, 402.610260, -105.474068, -55.044727);
--Internal Imperial hangar
AddCameraShot(0.988295, -0.091070, 0.121873, 0.011230, 33.932011, 10.868500, 1567.624146);
-- Imperial ship overall
AddCameraShot(-0.380690, 0.021761, -0.922940, -0.052756, 1351.167236, 188.651230, -10.971837);
-- Alliance ship overall
AddCameraShot(0.941014, -0.051715, 0.333887, 0.018349, 1053.546143, 188.651230, -51.276745);

AddDeathRegion("deathregion1")
AddDeathRegion("deathregion2")
AddLandingRegion("all-CP1Con")
AddLandingRegion("all-CP2Con")
AddLandingRegion("all-CP3Con")
AddLandingRegion("imp-CP1Con")
AddLandingRegion("imp-CP2Con")
AddLandingRegion("imp-CP3Con")

end
Linked Frigate Lua
Hidden/Spoiler:
--
-- No longer Pandemic's, xwingguy wrote this code.
-- That means if you use this, you MUST include me in your credits.
--


-- Also this code assumes that your Frigate Turrets have no destroyed geometry
--------------------------------------------
LinkedFrigate =
{
TurretList = nil, --List of turret names that must be destroyed when the Frigate is destroyed
Frigate = nil, --Name of the frigate (duh)

New = function(self, o)
o = o or {}
setmetatable(o, self)
self.__index = self
return o
end,


Init = function(self)

local DestroyFrigate = function(list)
for _, obj in ipairs(list) do
if IsObjectAlive(obj) then
KillObject(obj)
end
SetProperty( obj, "RespawnTime", 99999999)
SetProperty( obj, "Team", 0)
end
end
--init stuff (really dang simple actually)
OnObjectKillName(
function()
DestroyFrigate(self.TurretList)
end,
self.Frigate)

end,
}
Mission Req
Hidden/Spoiler:
ucft
{
REQN
{
"config"
"ingame_movies"
}

REQN
{
"script"
"setup_teams"
"gametype_conquest"
"gametype_capture"
"Objective"
"MultiObjectiveContainer"
"ObjectiveCTF"
"ObjectiveAssault"
"ObjectiveSpaceAssault"
"ObjectiveConquest"
"ObjectiveTDM"
"ObjectiveOneFlagCTF"
"SoundEvent_ctf"
"ObjectiveGoto"
"LinkedShields"
"LinkedDestroyables"
"LinkedTurrets"
"Ambush"
"PlayMovieWithTransition"
"LinkedFrigate"
}

REQN
{
"lvl"
"BODg_Diet Dr. Pepper"
}
}
Thanks
Last edited by EGG_GUTS on Wed Jan 02, 2008 1:08 pm, edited 1 time in total.
User avatar
Silas
Captain
Captain
Posts: 481
Joined: Thu Oct 11, 2007 5:30 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Contact:

Re: Linked Turret = Fatal Crash

Post by Silas »

Message Severity: 5
.\Source\GameState.cpp(1283)
Could not open MISSION\BODg_Diet Dr. Pepper.lvl

5!?!?!?!? :eek: :shock: :cantina:
FragMe!
Gametoast Staff
Gametoast Staff
Posts: 2244
Joined: Sat May 13, 2006 12:34 am
Projects :: Not sure keep changing my mind.
Games I'm Playing :: F1 and SWBF
xbox live or psn: No gamertag set
Location: Origin name GT_FragMe
Contact:

Re: Linked Turret = Fatal Crash

Post by FragMe! »

Something you changed in the BODg_cmn.lua near the line it states (maybe forgot comma or "or })
EGG_GUTS
Master Bounty Hunter
Master Bounty Hunter
Posts: 1626
Joined: Thu Dec 07, 2006 7:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: CANADA!

Re: Linked Turret = Fatal Crash

Post by EGG_GUTS »

I don't think that would cause all these crashes though.
FragMe!
Gametoast Staff
Gametoast Staff
Posts: 2244
Joined: Sat May 13, 2006 12:34 am
Projects :: Not sure keep changing my mind.
Games I'm Playing :: F1 and SWBF
xbox live or psn: No gamertag set
Location: Origin name GT_FragMe
Contact:

Re: Linked Turret = Fatal Crash

Post by FragMe! »

Actually it does, because there was the error in the BODg_cmn.lua it basically stopped processing things properly and therefore didn't write the mission.lvl and the BODg_Diet Dr. Pepper.lvl files correctly (left them as unfinished files poor little bits of it's true self as it were) fix the error in the cmn.lua and the other errors go away.

My rule of thumb (and cause it happens to me often) as soon as I get one of those errors in the munge log I don't even try to run the game I know it will crash, I go and look at what I just changed while it was still fresh in my brain.

Anyway hope it's only a comma
EGG_GUTS
Master Bounty Hunter
Master Bounty Hunter
Posts: 1626
Joined: Thu Dec 07, 2006 7:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: CANADA!

Re: Linked Turret = Fatal Crash

Post by EGG_GUTS »

Ok thanks FragMe! it's no longer a Fatel Error just a normal crash

But there's barely anything it the munge log
Hidden/Spoiler:
Opened logfile BFront2.log 2007-12-31 2039
ingame stream movies\crawl.mvs
prev = none iLastPage = nil
prev = texture iLastPage = 1
prev = texture iLastPage = 2
prev = texture iLastPage = 3
ifs_legal.Exit

Message Severity: 2
.\Source\GameMovie.cpp(399)
Unable to find open movie segment shell_main

ifs_saveop_DoOps LoadFileList
ifs_saveop_DoOps LoadFileList
ifs_saveop_DoOps LoadProfile
ifs_saveop_DoOps LoadProfile
num, Selection = 1 table: 03EFE7D0
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 1
EraSelection.subst = c era_c
play movie JN1 200 , 300 510 x 400

Message Severity: 2
.\Source\GameMovie.cpp(399)
Unable to find open movie segment JN10.000000ly

+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 4
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 5
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 6
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 8
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 9
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 10
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 14
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 15
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 18
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 20
EraSelection.subst = c era_c
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 21
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 25
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 28
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 30
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 33
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 34
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 36
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 38
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 41
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 42
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 44
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 46
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 49
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 50
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 51
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 53
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 54
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 55
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 56
EraSelection.subst = c era_c
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 57
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 58
EraSelection.subst = c era_c
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 59
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 60
EraSelection.subst = c era_c
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 61
EraSelection.subst = c era_c
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 62
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 63
EraSelection.subst = c era_c
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 64
EraSelection.subst = c era_c
EraSelection.subst = c era_c
num, Selection = 1 table: 03EFE7D0
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 59
EraSelection.subst = g era_g
play movie JN1 200 , 300 510 x 400

Message Severity: 2
.\Source\GameMovie.cpp(399)
Unable to find open movie segment JN10.000000ly

bEra_CloneWar = 1 bEra_Galactic = 1
clonewar_visable = false galactic_visable = true
Adding map: BODg_Diet Dr. Pepper idx: 1
this.CurButton = _map_add
cur_button = nil
this.CurButton = Launch
cur_button = nil
(none):0: attempt to call global `ScriptCB_Dofile' (a nil value)
My Lua
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
-- SPA9 - Naboo
-- Common script that shares all setup information
--

ScriptCB_DoFile("setup_teams")

ScriptCB_Dofile("LinkedFrigate")

-- Republic Attacking (attacker is always #1)
ALL = 1
IMP = 2
-- These variables do not change
ATT = 1
DEF = 2

function SetupUnits()
ReadDataFile("dc:SIDE\\all.lvl",
"all_inf_pilot",
"all_inf_marine",
"all_inf_duros",
"all_inf_pilotfemale",
"all_fly_xwing_sc",
"all_droid_r2d2",
"all_inf_officer",
"all_hero_chewbacca",
"all_inf_sullust",
"all_fly_ywing_sc",
"all_fly_awing",
"all_fly_gunship_sc",
"all_veh_remote_terminal")
ReadDataFile("dc:SIDE\\imp.lvl",
"imp_inf_pilot",
"imp_inf_marine",
"imp_inf_engineer",
"imp_inf_rifleman",
"imp_inf_officer_gray",
"imp_inf_scanner",
"imp_inf_rocketeer",
"imp_fly_tiefighter_sc",
"imp_fly_tiebomber_sc",
"imp_fly_tieinterceptor",
"imp_fly_trooptrans",
"imp_veh_remote_terminal")

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

ReadDataFile("dc:SIDE\\vehicles.lvl",
"all_fly_kwing",
"all_fly_bwing",
"imp_fly_tiedefender",
"imp_fly_tiephantom")

ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_spa_all_beam",
"tur_bldg_spa_all_recoilless",
"tur_bldg_spa_all_chaingun",
"tur_bldg_spa_imp_beam",
"tur_bldg_spa_imp_recoilless",
"tur_bldg_spa_imp_chaingun",
"tur_bldg_chaingun_roof"
)
end

myTeamConfig = {
all = {
team = ALL,
units = 32,
reinforcements = -1,
pilot = { "all_inf_pilot",6},
marine = { "all_inf_marine",4},
},

imp = {
team = IMP,
units = 32,
reinforcements = -1,
pilot = { "imp_inf_pilot",10},
marine = { "imp_inf_marine",6},
}
}

ScriptCB_DoFile("LinkedTurrets")
function SetupTurrets()
--ALL turrets
turretLinkageALL = LinkedTurrets:New{ team = ALL, mainframe = "all-defense",
turrets = {"all_turr_1", "all_turr_2", "all_turr_3", "all_turr_4", "all_turr_5", "all_turr_6"} }
turretLinkageALL:Init()

function turretLinkageALL:OnDisableMainframe()
ShowMessageText("level.spa.hangar.mainframe.atk.down", IMP)
ShowMessageText("level.spa.hangar.mainframe.def.down", ALL)

BroadcastVoiceOver( "IOSMP_obj_20", IMP )
BroadcastVoiceOver( "AOSMP_obj_21", ALL )
end
function turretLinkageALL:OnEnableMainframe()
ShowMessageText("level.spa.hangar.mainframe.atk.up", IMP)
ShowMessageText("level.spa.hangar.mainframe.def.up", ALL)

BroadcastVoiceOver( "IOSMP_obj_22", IMP )
BroadcastVoiceOver( "AOSMP_obj_23", ALL )
end

--IMP turrets
turretLinkageIMP = LinkedTurrets:New{ team = IMP, mainframe = "imp-defense",
turrets = {"imp_turr_1", "imp_turr_2", "imp_turr_3", "imp_turr_4", "imp_turr_5", "imp_turr_6"} }
turretLinkageIMP:Init()

function turretLinkageIMP:OnDisableMainframe()
ShowMessageText("level.spa.hangar.mainframe.atk.down", ALL)
ShowMessageText("level.spa.hangar.mainframe.def.down", IMP)

BroadcastVoiceOver( "IOSMP_obj_21", IMP )
BroadcastVoiceOver( "AOSMP_obj_20", ALL )
end
function turretLinkageIMP:OnEnableMainframe()
ShowMessageText("level.spa.hangar.mainframe.atk.up", ALL)
ShowMessageText("level.spa.hangar.mainframe.def.up", IMP)

BroadcastVoiceOver( "IOSMP_obj_23", IMP )
BroadcastVoiceOver( "AOSMP_obj_22", ALL )
end
end

--IMP *Frigates*

local impfrig1list = {"imp_turr_79", " imp_turr_80", "imp_turr_81", "imp_turr_82", "imp_turr_83", "imp_turr_84" }
ImpFrigate1 = LinkedFrigate:New{TurretList = impfrig1list, Frigate = "imp-frigate"}
ImpFrigate1:Init()

-- adjust extents to fit cap ship
function ScriptPreInit()
SetWorldExtents(2650)
ScriptPreInit = nil
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, this line *MUST* be first!
ReadDataFile("ingame.lvl")

--tell the game to load our loading image
ReadDataFile("dc:Load\\common.lvl")


SetMinFlyHeight(-1800)
SetMaxFlyHeight(3000)
SetMinPlayerFlyHeight(-1800)
SetMaxPlayerFlyHeight(3000)
SetAIVehicleNotifyRadius(100)

ReadDataFile("sound\\spa.lvl;spa1gcw")
ScriptCB_SetDopplerFactor(0.4)
ScaleSoundParameter("tur_weapons", "MinDistance", 3.0);
ScaleSoundParameter("tur_weapons", "MaxDistance", 3.0);
ScaleSoundParameter("tur_weapons", "MuteDistance", 3.0);
ScaleSoundParameter("Ordnance_Large", "MinDistance", 3.0);
ScaleSoundParameter("Ordnance_Large", "MaxDistance", 3.0);
ScaleSoundParameter("Ordnance_Large", "MuteDistance", 3.0);
ScaleSoundParameter("explosion", "MaxDistance", 5.0);
ScaleSoundParameter("explosion", "MuteDistance", 5.0);

SetupUnits()
SetupTeams(myTeamConfig)

AddUnitClass(IMP, "imp_inf_engineer",3)
AddUnitClass(IMP, "imp_inf_rifleman",5)
AddUnitClass(IMP, "imp_inf_scanner",4)
AddUnitClass(IMP, "imp_inf_officer_gray",2)
AddUnitClass(IMP, "imp_inf_rocketeer",2)

AddUnitClass(ALL, "all_inf_duros",6)
AddUnitClass(ALL, "all_inf_pilotfemale",6)
AddUnitClass(ALL, "all_droid_r2d2",6)
AddUnitClass(ALL, "all_inf_officer",3)
AddUnitClass(ALL, "all_hero_chewbacca",1)

-- Level Stats
ClearWalkers()
local weaponCnt = 250
local guyCnt = 32
SetMemoryPoolSize("Aimer", 190)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 89)
SetMemoryPoolSize("Combo::DamageSample", 0)
SetMemoryPoolSize("CommandFlyer", 3)
SetMemoryPoolSize("SoldierAnimation", 180)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 0)
SetMemoryPoolSize("EntityDroid", 0)
SetMemoryPoolSize("EntityDefenseGridTurret", 0)
SetMemoryPoolSize("EntityFlyer", 32)
SetMemoryPoolSize("EntityLight", 115)
SetMemoryPoolSize("EntityRemoteTerminal", 12)
SetMemoryPoolSize("FLEffectObject::OffsetMatrix", 180)
SetMemoryPoolSize("MountedTurret", 56)
SetMemoryPoolSize("EntityPortableTurret", 20)
SetMemoryPoolSize("Navigator", guyCnt)
SetMemoryPoolSize("Obstacle", 135)
SetMemoryPoolSize("PathNode", 80)
SetMemoryPoolSize("PathFollower", guyCnt)
SetMemoryPoolSize("TentacleSimulator", 0)
SetMemoryPoolSize("TreeGridStack", 240)
SetMemoryPoolSize("UnitAgent", 65) -- guyCnt*2
SetMemoryPoolSize("UnitController", 65)
SetMemoryPoolSize("Weapon", weaponCnt)

SetSpawnDelay(10.0, 0.25)

-- do any pool allocations, custom loading here
if myScriptInit then
myScriptInit()
myScriptInit = nil
end

ReadDataFile("dc:BOD\\spa_sky.lvl", "dag")

ReadDataFile("dc:BOD\\BOD.lvl", myGameMode)

SetDenseEnvironment("false")

SetParticleLODBias(15000)

-- Sound Stats
local voiceSlow = OpenAudioStream("sound\\global.lvl", "spa1_objective_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "all_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "imp_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)

local voiceQuick = OpenAudioStream("sound\\global.lvl", "imp_unit_vo_quick")
AudioStreamAppendSegments("sound\\global.lvl", "all_unit_vo_quick", voiceQuick)

-- OpenAudioStream("sound\\spa.lvl", "spa1_objective_vo_slow")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
OpenAudioStream("sound\\global.lvl", "gcw_music")
OpenAudioStream("sound\\spa.lvl", "spa")
OpenAudioStream("sound\\spa.lvl", "spa")

SetBleedingVoiceOver(ALL, ALL, "all_off_com_report_us_overwhelmed", 1)
SetBleedingVoiceOver(ALL, IMP, "all_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(IMP, ALL, "imp_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(IMP, IMP, "imp_off_com_report_us_overwhelmed", 1)

SetLowReinforcementsVoiceOver(ALL, ALL, "all_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(ALL, IMP, "all_off_victory_im", .1, 1)
SetLowReinforcementsVoiceOver(IMP, IMP, "imp_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(IMP, ALL, "imp_off_victory_im", .1, 1)

SetOutOfBoundsVoiceOver(ALL, "allleaving")
SetOutOfBoundsVoiceOver(IMP, "impleaving")

SetAmbientMusic(ALL, 1.0, "all_spa_amb_start", 0,1)
SetAmbientMusic(ALL, 0.99, "all_spa_amb_middle", 1,1)
SetAmbientMusic(ALL, 0.1,"all_spa_amb_end", 2,1)
SetAmbientMusic(IMP, 1.0, "imp_spa_amb_start", 0,1)
SetAmbientMusic(IMP, 0.99, "imp_spa_amb_middle", 1,1)
SetAmbientMusic(IMP, 0.1,"imp_spa_amb_end", 2,1)

SetVictoryMusic(ALL, "all_spa_amb_victory")
SetDefeatMusic (ALL, "all_spa_amb_defeat")
SetVictoryMusic(IMP, "imp_spa_amb_victory")
SetDefeatMusic (IMP, "imp_spa_amb_defeat")

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
-- SetSoundEffect("BirdScatter", "birdsFlySeq1")
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
SetAttackingTeam(IMP)
-- Internal Alliance hangar
-- this shot is bad, needs to be fixed
AddCameraShot(-0.049495, 0.003922, -0.995646, -0.078892, 24.992880, -22.995819, -1025.940186);
--Flag shot
AddCameraShot(0.546201, 0.047743, 0.833116, -0.072822, 402.610260, -105.474068, -55.044727);
--Internal Imperial hangar
AddCameraShot(0.988295, -0.091070, 0.121873, 0.011230, 33.932011, 10.868500, 1567.624146);
-- Imperial ship overall
AddCameraShot(-0.380690, 0.021761, -0.922940, -0.052756, 1351.167236, 188.651230, -10.971837);
-- Alliance ship overall
AddCameraShot(0.941014, -0.051715, 0.333887, 0.018349, 1053.546143, 188.651230, -51.276745);

AddDeathRegion("deathregion1")
AddDeathRegion("deathregion2")
AddLandingRegion("all-CP1Con")
AddLandingRegion("all-CP2Con")
AddLandingRegion("all-CP3Con")
AddLandingRegion("imp-CP1Con")
AddLandingRegion("imp-CP2Con")
AddLandingRegion("imp-CP3Con")

end
So why is it crashing?

THanks
FragMe!
Gametoast Staff
Gametoast Staff
Posts: 2244
Joined: Sat May 13, 2006 12:34 am
Projects :: Not sure keep changing my mind.
Games I'm Playing :: F1 and SWBF
xbox live or psn: No gamertag set
Location: Origin name GT_FragMe
Contact:

Re: Linked Turret = Fatal Crash

Post by FragMe! »

The very last line in your error log. It is trying to do a doFile but can find the doFile to do anything with (sorry couldn't resist) That is why is it returning the nil.
You could try commenting all the turret stuff you put in just put -- in front of the lines. Also I have not done any linkturret or frigate things but I do remember helping someone else with the problem too. But I can't remember at this moment maybe I'll search and see if I can find it and post the link.
EGG_GUTS
Master Bounty Hunter
Master Bounty Hunter
Posts: 1626
Joined: Thu Dec 07, 2006 7:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: CANADA!

Re: Linked Turret = Fatal Crash

Post by EGG_GUTS »

ok thanks
MercuryNoodles
Jedi
Jedi
Posts: 1003
Joined: Sun Mar 12, 2006 7:16 pm
Projects :: Space - Boarding Action
xbox live or psn: No gamertag set

Re: Linked Turret = Fatal Crash

Post by MercuryNoodles »

Do you have a LinkedFrigate lua (a complete one) in your scripts folder? From what I saw above, you have LinkedTurrets specified in the req, and a lua for it, but no lua for LinkedFrigate. (So, it seems to me that it's calling for LinkedFrigate and crashing because there's nothing there to read.) Why not call for LinkedTurrets in the cmn lua instead, remove the DoFile call for LinkedFrigate from the cmn lua, and delete the reference to LinkedFrigate in the mission req? That should clear up the problem. It looks to me like you were trying something different and didn't go all the way through with it.
EGG_GUTS
Master Bounty Hunter
Master Bounty Hunter
Posts: 1626
Joined: Thu Dec 07, 2006 7:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: CANADA!

Re: Linked Turret = Fatal Crash

Post by EGG_GUTS »

Oooooops, I meant to say linked frigate lua when I said linked turrets :oops:
MercuryNoodles
Jedi
Jedi
Posts: 1003
Joined: Sun Mar 12, 2006 7:16 pm
Projects :: Space - Boarding Action
xbox live or psn: No gamertag set

Re: Linked Turret = Fatal Crash

Post by MercuryNoodles »

Ok, disregard the above, then. So, does the LinkedFrigate script's actual filename match what you have in the mission req and cmn lua? By that, I mean you should have a LinkedFrigate.lua (not LinkedFrigate.lua.txt) somewhere in the scripts folder. I hate being insulting, but I have to be sure it's not one of those mistakes. :P
EGG_GUTS
Master Bounty Hunter
Master Bounty Hunter
Posts: 1626
Joined: Thu Dec 07, 2006 7:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: CANADA!

Re: Linked Turret = Fatal Crash

Post by EGG_GUTS »

Yes, It's lua but when I open it I get this, and I don't get it with other Luas

Image
MercuryNoodles
Jedi
Jedi
Posts: 1003
Joined: Sun Mar 12, 2006 7:16 pm
Projects :: Space - Boarding Action
xbox live or psn: No gamertag set

Re: Linked Turret = Fatal Crash

Post by MercuryNoodles »

I don't use MS Word, at least, not anymore, so that's a new one on me. I don't see what would make it do that. I'd say go with the one that simply says Windows.

I looked around the web to see what I was dealing with as far as understanding text encoding. It's a lot of reading about code, binary, octets, and it hurts my brain. :P The differences between most of those probably won't even be noticeable to you, but I'd say stick with my above suggestion or ASCII, to be safe, for now.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Linked Turret = Fatal Crash

Post by [RDH]Zerted »

FragMe! wrote:The very last line in your error log. It is trying to do a doFile but can't find the doFile to do anything with (sorry couldn't resist) That is why is it returning the nil.
Close... Its not returning anything, it can't find what to call.

Code: Select all

(none):0: attempt to call global `ScriptCB_Dofile' (a nil value)
The error is 'attempt to call a nil value'. Global is just the scope where its looking for ScriptCB_Dofile. The compiler can't find ScriptCB_Dofile because it doesn't exist (things that are undefined are nil). However, there is a similar function named ScriptCB_DoFile. Maybe you forgot to hold the shift key?

MS Word is for documents. When writing/reading code, use a text editor (notepad, wordpad) or a code editor (LuaEdit, etc...), not a document editor.
EGG_GUTS
Master Bounty Hunter
Master Bounty Hunter
Posts: 1626
Joined: Thu Dec 07, 2006 7:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: CANADA!

Re: Linked Turret = Fatal Crash

Post by EGG_GUTS »

Thanks Zetard, I forgot to cap the F.

But now it says it's the Linked Frigate Lua it self.

Linked Frigate Lua
Hidden/Spoiler:
--
-- No longer Pandemic's, xwingguy wrote this code.
-- That means if you use this, you MUST include me in your credits.
--


-- Also this code assumes that your Frigate Turrets have no destroyed geometry
--------------------------------------------
LinkedFrigate =
{
TurretList = nil, --List of turret names that must be destroyed when the Frigate is destroyed
Frigate = nil, --Name of the frigate (duh)

New = function(self, o)
o = o or {}
setmetatable(o, self)
self.__index = self
return o
end,


Init = function(self)

local DestroyFrigate = function(list)
for _, obj in ipairs(list) do
if IsObjectAlive(obj) then
KillObject(obj)
end
SetProperty( obj, "RespawnTime", 99999999)
SetProperty( obj, "Team", 0)
end
end
--init stuff (really dang simple actually)
OnObjectKillName()
function()
DestroyFrigate(self.TurretList)
end,
self.Frigate)

end,
}


Bf2 log
Hidden/Spoiler:
Opened logfile BFront2.log 2008-01-03 1410
ingame stream movies\crawl.mvs
prev = none iLastPage = nil
prev = texture iLastPage = 1
prev = texture iLastPage = 2
prev = texture iLastPage = 3
ifs_legal.Exit

Message Severity: 2
.\Source\GameMovie.cpp(399)
Unable to find open movie segment shell_main

ifs_saveop_DoOps LoadFileList
ifs_saveop_DoOps LoadFileList
ifs_saveop_DoOps LoadProfile
ifs_saveop_DoOps LoadProfile
num, Selection = 1 table: 03EFE7D0
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 1
EraSelection.subst = c era_c
play movie JN1 200 , 300 510 x 400

Message Severity: 2
.\Source\GameMovie.cpp(399)
Unable to find open movie segment JN10.000000ly

+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 7
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 8
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 9
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 10
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 12
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 14
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 16
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 18
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 20
EraSelection.subst = c era_c
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 22
EraSelection.subst = c era_c
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 25
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 27
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 28
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 30
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 33
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 34
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 37
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 38
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 39
EraSelection.subst = c era_c
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 43
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 45
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 46
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 49
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 50
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 51
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 52
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 53
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 55
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 56
EraSelection.subst = c era_c
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 57
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 58
EraSelection.subst = c era_c
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 59
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 60
EraSelection.subst = c era_c
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 61
EraSelection.subst = c era_c
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 62
EraSelection.subst = c era_c
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 63
EraSelection.subst = c era_c
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 64
EraSelection.subst = c era_c
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 65
EraSelection.subst = g era_g
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 66
EraSelection.subst = c era_c
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 67
EraSelection.subst = c era_c
EraSelection.subst = c era_c
num, Selection = 1 table: 03EFE7D0
+++mission modes changed! ifs_mspc_MapList_layout.SelectedIdx = 59
EraSelection.subst = g era_g
play movie JN1 200 , 300 510 x 400

Message Severity: 2
.\Source\GameMovie.cpp(399)
Unable to find open movie segment JN10.000000ly

this.CurButton = nil
cur_button = nil
bEra_CloneWar = 1 bEra_Galactic = 1
clonewar_visable = false galactic_visable = true
Adding map: BODg_Diet Dr. Pepper idx: 1
this.CurButton = _map_add
cur_button = nil
this.CurButton = Launch
cur_button = nil
(none):0: attempt to call global `OnObjectKillName' (a nil value)
Munge Log
Hidden/Spoiler:
C:\BF2_ModTools\ToolsFL\Bin\luac.exe: ..\..\common\scripts\LinkedFrigate.lua:35: <name> expected near `('
ERROR[scriptmunge scripts\LinkedFrigate.lua]:Could not read input file.ERROR[scriptmunge scripts\LinkedFrigate.lua]:Could not read input file. [continuing]
2 Errors 0 Warnings

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

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

ucft <--

2 Errors 0 Warnings
It says OnObjectKill is a nil value.

How can I stop the crashing once and for all?

Thanks
FragMe!
Gametoast Staff
Gametoast Staff
Posts: 2244
Joined: Sat May 13, 2006 12:34 am
Projects :: Not sure keep changing my mind.
Games I'm Playing :: F1 and SWBF
xbox live or psn: No gamertag set
Location: Origin name GT_FragMe
Contact:

Re: Linked Turret = Fatal Crash

Post by FragMe! »

Code: Select all

SetProperty( obj, "RespawnTime", 99999999)
SetProperty( obj, "Team", 0)
end
end
--init stuff (really dang simple actually)
OnObjectKillName()
function()
DestroyFrigate(self.TurretList)
end, 
self.Frigate)

end,
}
Missing ( by self.frigate)
should probably remove the space that is infront of the obj things near the top of what I posted.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Linked Turret = Fatal Crash

Post by [RDH]Zerted »

Just like before, OnObjectKillName() doesn't exist in your context. Maybe you meant OnObjectKillName( ?

If you get an error while munging, you shouldn't even try to run the map.

The easiest way to not get errors is to not mod.
EGG_GUTS
Master Bounty Hunter
Master Bounty Hunter
Posts: 1626
Joined: Thu Dec 07, 2006 7:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: CANADA!

Re: Linked Turret = Fatal Crash

Post by EGG_GUTS »

Ok, I'll try it.

and I usually never have big problems like this. I've released 3 maps and one side with no problems at all.

PS: I didn't make the Lua, it's Xwingguy's

EDIT: Diet Dr. Pepper :x

I got this
Hidden/Spoiler:
C:\BF2_ModTools\ToolsFL\Bin\luac.exe: ..\..\common\scripts\LinkedFrigate.lua:40: `)' expected (to close `(' at line 34) near `end'
ERROR[scriptmunge scripts\LinkedFrigate.lua]:Could not read input file.ERROR[scriptmunge scripts\LinkedFrigate.lua]:Could not read input file. [continuing]
2 Errors 0 Warnings

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

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

ucft <--

2 Errors 0 Warnings
My Linked Frigate Lua
Hidden/Spoiler:
--
-- No longer Pandemic's, xwingguy wrote this code.
-- That means if you use this, you MUST include me in your credits.
--


-- Also this code assumes that your Frigate Turrets have no destroyed geometry
--------------------------------------------
LinkedFrigate =
{
TurretList = nil, --List of turret names that must be destroyed when the Frigate is destroyed
Frigate = nil, --Name of the frigate (duh)

New = function(self, o)
o = o or {}
setmetatable(o, self)
self.__index = self
return o
end,


Init = function(self)

local DestroyFrigate = function(list)
for _, obj in ipairs(list) do
if IsObjectAlive(obj) then
KillObject(obj)
end
SetProperty(obj, "RespawnTime", 99999999)
SetProperty(obj, "Team", 0)
end
end
--init stuff (really dang simple actually)
OnObjectKillName(
function()
DestroyFrigate(self.TurretList)
end,
(self.Frigate)

end,
}
God, this is really ticking me off. I followed Xwing Guy's tut exactly and looked at a fully functional lua with Linked Frigate and still no Luck :x
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Linked Turret = Fatal Crash

Post by [RDH]Zerted »

Remove the extra ( you added before self.frigate. The ) at the end of self.frigate should match the starting one at OnObjectKillName(

You need a closing ) for every (.

If you get another error, put a comma on the end of the end on the line right before --init stuff
FragMe!
Gametoast Staff
Gametoast Staff
Posts: 2244
Joined: Sat May 13, 2006 12:34 am
Projects :: Not sure keep changing my mind.
Games I'm Playing :: F1 and SWBF
xbox live or psn: No gamertag set
Location: Origin name GT_FragMe
Contact:

Re: Linked Turret = Fatal Crash

Post by FragMe! »

Things can be frustrating but hang in there.
Okay now I am home and have the good editor lets go back an error

Code: Select all

C:\BF2_ModTools\ToolsFL\Bin\luac.exe: ..\..\common\scripts\LinkedFrigate.lua:35: <name> expected near `('
ERROR[scriptmunge scripts\LinkedFrigate.lua]:Could not read input file.ERROR[scriptmunge scripts\LinkedFrigate.lua]:Could not read input file. [continuing]
2 Errors 0 Warnings
Line 35 as indicated is:
function() the error is stating it needs a name. I have not looked at xwingsguys tut so am not totally familiar with it and whether or not there is supposed to be a name. Lin e36 BTW is DestroyFrigate(self.TurretList). Now as I mentioned the was a missing bracket as well which could have caused the first error is there is not supposed to be a name in the ().

Moving on to the error after the "fix"

Code: Select all

C:\BF2_ModTools\ToolsFL\Bin\luac.exe: ..\..\common\scripts\LinkedFrigate.lua:40: `)' expected (to close `(' at line 34) near `end'
ERROR[scriptmunge scripts\LinkedFrigate.lua]:Could not read input file.ERROR[scriptmunge scripts\LinkedFrigate.lua]:Could not read input file. [continuing]
2 Errors 0 Warnings
Line 40 is the last end, which means it is looking for a closing bracket ) before line 40. Which actually comparing the two luas the missing bracket is up on line 34 which is currently:

OnObjectKillName(

so it is missing it's closing bracket.

BTW a good free editor to use for LUAs (Teancum mentioned it once) is a program called SciTE. Can be found here http://scintilla.sourceforge.net/SciTEDownload.html download the fulldownload under the windows heading. THe good thing about the program is it is can display many programing languages, LUA being one of them, but it will show you line numbers and more importantly coding errors like missing brackets (by clicking on one bracket it shows you where it's pair is or turns red if it is missing one same with ") I find it useful anyway.
Post Reply