What's wrong with this lua? [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
genaral_mitch
Jedi
Jedi
Posts: 1056
Joined: Fri Aug 14, 2009 12:32 am

What's wrong with this lua? [Solved]

Post by genaral_mitch »

Ahh! It keeps saying ERROR*** .LUAC RETURNED! and I fixed it the first time when it was missing ) at the end af a side. But now it says it still and I looked through it and saw nothing.
Hidden/Spoiler:
function SetupUnits()
ReadDataFile("dc:SIDE\\rep.lvl",
"rep_inf_ep2_pilot",
"rep_inf_ep2_marine",
"rep_inf_fil",
"rep_fly_anakinstarfighter_sc",
"rep_fly_arc170fighter_sc",
"rep_veh_remote_terminal",
"rep_fly_gunship_sc",
"rep_fly_vwing")

ReadDataFile("SIDE\\cis.lvl",
"cis_inf_pilot",
"cis_inf_marine",
"cis_fly_droidfighter_sc",
"cis_fly_droidgunship",
"cis_fly_greviousfighter",
"cis_fly_tridroidfighter")

ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_spa_cis_beam",
"tur_bldg_spa_cis_chaingun",
"tur_bldg_spa_rep_beam",
"tur_bldg_spa_rep_chaingun",
"tur_bldg_chaingun_roof")

ReadDataFile("dc:SIDE\\vehicles.lvl",
"rep_fly_v19_sc")
)
end

myTeamConfig = {
rep = {
team = REP,
units = 32,
reinforcements = -1,
pilot = { "rep_inf_ep2_pilot",26},
marine = { "rep_inf_fil",1},
},
cis = {
team = CIS,
units = 32,
reinforcements = -1,
pilot = { "cis_inf_pilot",26},
marine = { "cis_inf_marine",6},

}
}
Last edited by genaral_mitch on Tue Dec 22, 2009 4:37 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: What's wrong with this lua?

Post by AQT »

Based on what you have there:

1. You don't need the function SetupUnits() line.
2. You have a random ) and end after "rep_fly_v19_sc").
3. myTeamConfig = { was made up. Have a look at a stock script to see how it's really set up.
4. You are missing a , after the second to last bracket.
genaral_mitch
Jedi
Jedi
Posts: 1056
Joined: Fri Aug 14, 2009 12:32 am

Re: What's wrong with this lua?

Post by genaral_mitch »

This a space lua.
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: What's wrong with this lua?

Post by AQT »

You have a random ) after "rep_fly_v19_sc").
Darth_Spiderpig
Sith Master
Sith Master
Posts: 2631
Joined: Fri Mar 27, 2009 10:23 am
Projects :: Something cool...
Games I'm Playing :: BF2 CoDBO BFBC2
xbox live or psn: Has no xbox....Yup
Location: Does whatever a Spiderpig does
Contact:

Re: What's wrong with this lua?

Post by Darth_Spiderpig »

genaral_mitch wrote:This a space lua.
Then you only have a ) too much after the torrent fighter part. :wink:

EDIT: Grmpf, again too slow. :x
genaral_mitch
Jedi
Jedi
Posts: 1056
Joined: Fri Aug 14, 2009 12:32 am

Re: What's wrong with this lua?

Post by genaral_mitch »

AQT, you're my hero! It works!
Darth_Spiderpig
Sith Master
Sith Master
Posts: 2631
Joined: Fri Mar 27, 2009 10:23 am
Projects :: Something cool...
Games I'm Playing :: BF2 CoDBO BFBC2
xbox live or psn: Has no xbox....Yup
Location: Does whatever a Spiderpig does
Contact:

Re: What's wrong with this lua?

Post by Darth_Spiderpig »

genaral_mitch wrote:AQT, you're my hero!

And me? :(

Lol, I know, I have to get faster. :lol: :thumbs:
But I am glad it works again.
Post Reply