Page 1 of 1

[SOLVED]Side Not working

Posted: Thu Apr 09, 2009 5:21 am
by Xterminator
Ok ive done everything in calebs tut but theres a problem with my .lua (I think)

I tried to add a trooper to my rep side but when in game he doesnt appear.
After i munge i get 2 errors

Code: Select all

C:\BF2_ModTools\ToolsFL\Bin\luac.exe: ..\..\common\scripts\IHS\IHSc_con.lua:82: `)' expected (to close `(' at line 74) near `"rep_hover_fightertank"'
ERROR[scriptmunge scripts\IHS\IHSc_con.lua]:Could not read input file.ERROR[scriptmunge scripts\IHS\IHSc_con.lua]:Could not read input file. [continuing]
   2 Errors    0 Warnings

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

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

ucft <--

   2 Errors    0 Warnings

My .Lua

Code: Select all

 
    ReadDataFile("sound\\yav.lvl;yav1cw")
    ReadDataFile("dc:SIDE\\rep.lvl",
                             "rep_inf_ep3_rifleman",
                             "rep_inf_ep3_rocketeer",
                             "rep_inf_ep3_engineer",
                             "rep_inf_ep3_sniper",
                             "rep_inf_ep3_officer",
                             "rep_inf_ep3_jettrooper",
                             "rep_inf_arc_heavy_gunner"
                             "rep_hover_fightertank",
                             "rep_hero_anakin",
                             "rep_hover_barcspeeder"
    ReadDataFile("SIDE\\cis.lvl",
                             "cis_inf_rifleman",
                             "cis_inf_rocketeer",
                             "cis_inf_engineer",
                             "cis_inf_sniper",
                             "cis_inf_officer",
                             "cis_inf_droideka",
                             "cis_hero_darthmaul",
                             "cis_hover_aat")
                             
                             
    ReadDataFile("SIDE\\tur.lvl", 
    			"tur_bldg_laser",
    			"tur_bldg_tower")          
                             
	SetupTeams{
		rep = {
			team = REP,
			units = 20,
			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 = 20,
			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(CIS, "cis_hero_darthmaul")
    SetHeroClass(REP, "rep_hero_anakin")

    AddUnitClass(REP, "rep_inf_arc_heavy_gunner",1,4)
   

Help would be great :)

Thanks

Re: Side Not working

Posted: Thu Apr 09, 2009 5:38 am
by sampip
Read the error, you can see it was expecting a bracket, but none was found. You are missing a bracket after:

Code: Select all

"rep_hover_barcspeeder" 
.It should look like this:

Code: Select all

"rep_hover_barcspeeder") 
The other error is on your Arc gunner. You are missing a comma after

Code: Select all

"rep_inf_arc_heavy_gunner" 
. It should look like this:

Code: Select all

"rep_inf_arc_heavy_gunner", 
Try munging again after that.

Re: Side Not working

Posted: Thu Apr 09, 2009 5:48 am
by Xterminator
Ok i did what you said and it got rid of the errors but still no arc gunner .

But I did get anakin straight away is this somthing to do with it?

Re: Side Not working

Posted: Thu Apr 09, 2009 5:53 am
by sampip
I have a small idea, but could you post your .lua again please. Now that you've corrected it.
First of all, this:

Code: Select all

SetHeroClass(CIS, "cis_hero_darthmaul")
    SetHeroClass(REP, "rep_hero_anakin")

    AddUnitClass(REP, "rep_inf_arc_heavy_gunner",1,4)
Try putting it like this:

Code: Select all

AddUnitClass(REP, "rep_inf_arc_heavy_gunner",1,4)

SetHeroClass(CIS, "cis_hero_darthmaul")
SetHeroClass(REP, "rep_hero_anakin")
so that the Unit loads first. If this does not work, make sure your unit has a req, and make sure that he is called in your sides req folder.

Re: Side Not working

Posted: Thu Apr 09, 2009 5:56 am
by Xterminator

Code: Select all

    ReadDataFile("sound\\yav.lvl;yav1cw")
    ReadDataFile("dc:SIDE\\rep.lvl",
                             "rep_inf_ep3_rifleman",
                             "rep_inf_ep3_rocketeer",
                             "rep_inf_ep3_engineer",
                             "rep_inf_ep3_sniper",
                             "rep_inf_ep3_officer",
                             "rep_inf_ep3_jettrooper",
                             "rep_inf_arc_heavy_gunner",
                             "rep_hover_fightertank",
                             "rep_hero_anakin",
                             "rep_hover_barcspeeder")
    ReadDataFile("SIDE\\cis.lvl",
                             "cis_inf_rifleman",
                             "cis_inf_rocketeer",
                             "cis_inf_engineer",
                             "cis_inf_sniper",
                             "cis_inf_officer",
                             "cis_inf_droideka",
                             "cis_hero_darthmaul",
                             "cis_hover_aat")
                             
                             
    ReadDataFile("SIDE\\tur.lvl", 
    			"tur_bldg_laser",
    			"tur_bldg_tower")          
                             
	SetupTeams{
		rep = {
			team = REP,
			units = 20,
			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 = 20,
			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(CIS, "cis_hero_darthmaul")
    SetHeroClass(REP, "rep_hero_anakin")

    AddUnitClass(REP, "rep_inf_arc_heavy_gunner",1,4)
   

i'll try that now :)

Re: Side Not working

Posted: Thu Apr 09, 2009 5:58 am
by sampip
I seem to remember the same thing happened to me, but I forget how I fixed it now *bangs head on table*, I think that should work though. If it doesn't, try doing a manual clean, and then munging again. Something could have got stuck...
Off topic: 100 posts!! :D

Re: Side Not working

Posted: Thu Apr 09, 2009 6:04 am
by Xterminator
Thankyou swapping the heroes with the arc worked , thankyou you so much you are awesome :D

Re: [SOLVED]Side Not working

Posted: Thu Apr 09, 2009 6:13 am
by sampip
No problem. :D I've had to live through all these errors myself!! :wink: