Having Trouble Loading .LVLs from Another Folder [Solved]

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

Post Reply
User avatar
Nedarb7
Lieutenant General
Lieutenant General
Posts: 676
Joined: Sat Sep 22, 2012 3:41 pm

Having Trouble Loading .LVLs from Another Folder [Solved]

Post by Nedarb7 »

I'm trying to load my .lvls from one of my mods into a custom maps LUA. Here's what that would look like:
Hidden/Spoiler:
ReadDataFile("..\\..\\..\\OO1\\data\\_LVL_PC\\core.lvl")
ReadDataFile("..\\..\\..\\OO1\\data\\_LVL_PC\\ingame.lvl")

ReadDataFile("..\\..\\..\\OO1\\data\\_LVL_PC\\sound\\cvw.lvl;cvwgcw")

And so on.
For some reason they aren't being loaded and the game crashes. This is the error I'm getting:
Hidden/Spoiler:
Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\LuaCallbacks_Mission.cpp(866)
Lua ReadDataFile: Could not open ..\..\..\OO1\data\_LVL_PC\core.lvl

Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\LuaCallbacks_Mission.cpp(866)
Lua ReadDataFile: Could not open ..\..\..\OO1\data\_LVL_PC\ingame.lvl

Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\LuaCallbacks_Mission.cpp(866)
Lua ReadDataFile: Could not open ..\..\..\OO1\data\_LVL_PC\sound\cvw.lvl;cvwgcw
Any ideas?
Last edited by Nedarb7 on Tue Oct 15, 2013 7:46 pm, edited 1 time in total.
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Having Trouble Loading .LVLs from Another Folder

Post by AQT »

Code: Select all

ReadDataFile("..\\..\\addon\\OO1\\data\\_LVL_PC\\core.lvl")
The third pair of dots should be addon. :)
User avatar
Nedarb7
Lieutenant General
Lieutenant General
Posts: 676
Joined: Sat Sep 22, 2012 3:41 pm

Re: Having Trouble Loading .LVLs from Another Folder

Post by Nedarb7 »

Ah, so I can't have three pairs of dots. Interesting. Thanks, AQT, I'll get back with the results.

-EDIT-
Works, topic is solved.
Post Reply