Can't add Gungans [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
DarthHamster
Rebel Warrant Officer
Rebel Warrant Officer
Posts: 300
Joined: Wed Nov 18, 2009 9:09 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: Orlando, Florida
Contact:

Can't add Gungans [Solved]

Post by DarthHamster »

I followed the directions but when I played my map no Gungans.

Munge error report=

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

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

ucft <--

2 Errors 0 Warnings

This is from my maps script (this it were I think the error is coming from)=


SetTeamName (3, "Gungan")
AddUnitClass (3, "gun_inf_soldier", 10,15)
AddUnitClass (3, "gun_inf_defender", 10,15)
SetUnitCount (3, 15)
AddAIGoal(3, "Deathmatch", 100)
SetTeamAsEnemy(ATT,3)
SetTeamAsEnemy(3,ATT)
SetTeamAsEnemy(DEF,3)
SetTeamAsEnemy(3,DEF)

Anybody know were I'm missing the bracket? If I need to post anything else from my maps script let me know. THANKS
User avatar
CodaRez
Field Commander
Field Commander
Posts: 940
Joined: Mon May 25, 2009 6:49 am
Projects :: I would like one.....
Location: Ride around the world! And I won't give you anything :P

Re: Can't add Gungans

Post by CodaRez »

DarthHamster wrote:
Hidden/Spoiler:
I followed the directions but when I played my map no Gungans.

Munge error report=

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

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

ucft <--

2 Errors 0 Warnings

This is from my maps script (this it were I think the error is coming from)=


SetTeamName (3, "Gungan")
AddUnitClass (3, "gun_inf_soldier", 10,15)
AddUnitClass (3, "gun_inf_defender", 10,15)
SetUnitCount (3, 15)
AddAIGoal(3, "Deathmatch", 100)
SetTeamAsEnemy(ATT,3)
SetTeamAsEnemy(3,ATT)
SetTeamAsEnemy(DEF,3)
SetTeamAsEnemy(3,DEF)

Anybody know were I'm missing the bracket? If I need to post anything else from my maps script let me know. THANKS
Post the WHOLE LUA instead dude, outta help more.

(and also, u arent missing any there i believe, u may be missing more above, if u know what i mean)
User avatar
DarthHamster
Rebel Warrant Officer
Rebel Warrant Officer
Posts: 300
Joined: Wed Nov 18, 2009 9:09 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: Orlando, Florida
Contact:

Re: Can't add Gungans

Post by DarthHamster »

Is this what you mean.

ReadDataFile("SIDE\\gun.lvl",
"gun_inf_soldier"
"gun_inf_defender")

(thats from my script)

Besides that all I changed was adding the cp.


cp7 = CommandPost:New{name = "local_cp1"}
501st_commander
Master Bounty Hunter
Master Bounty Hunter
Posts: 1570
Joined: Wed Dec 10, 2008 7:48 pm

Re: Can't add Gungans

Post by 501st_commander »

ReadDataFile("SIDE\\gun.lvl",
"gun_inf_soldier", // add a , after each line in a readdatafile("side//blahblah except the last line
"gun_inf_defender")
User avatar
DarthHamster
Rebel Warrant Officer
Rebel Warrant Officer
Posts: 300
Joined: Wed Nov 18, 2009 9:09 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: Orlando, Florida
Contact:

Re: Can't add Gungans

Post by DarthHamster »

Added the coma and it WORKED! :P THANK YOU 501st_commander. Its amazing all that crap in the error report was caused by a missing coma! Just one question in the errors why did it say I was missing a bracket when I was missing a coma?

gtpwn
User avatar
CodaRez
Field Commander
Field Commander
Posts: 940
Joined: Mon May 25, 2009 6:49 am
Projects :: I would like one.....
Location: Ride around the world! And I won't give you anything :P

Re: Can't add Gungans

Post by CodaRez »

DarthHamster wrote:Added the coma and it WORKED! :P THANK YOU 501st_commander. Its amazing all that crap in the error report was caused by a missing coma! Just one question in the errors why did it say I was missing a bracket when I was missing a coma?

gtpwn
The LUA stops working because of a tiny coma, and the error log tells u its a bracket.

See the connection?

Obviously this system is real fussy yet inferior at the same time

(but hey, it makes great maps)
501st_commander
Master Bounty Hunter
Master Bounty Hunter
Posts: 1570
Joined: Wed Dec 10, 2008 7:48 pm

Re: Can't add Gungans [Solved]

Post by 501st_commander »

Here is how it works. If it's missing a comma it looks for a bracket like this:

ReadDataFile("SIDE\\gun.lvl",
"gun_inf_soldier") // no comma. end. looking for bracket.. found.
"gun_inf_defender") //ERROR


If you have a comma it tells the VM that it has another line to add.

ReadDataFile("SIDE\\gun.lvl",
"gun_inf_soldier", // comma. add next line.
"gun_inf_defender") // no comma. end. looking for bracket.. found.


If no comma or bracket on line.

ReadDataFile("SIDE\\gun.lvl",
"gun_inf_soldier" // No comma. No bracket. ERROR
"gun_inf_defender") //ERROR
User avatar
DarthHamster
Rebel Warrant Officer
Rebel Warrant Officer
Posts: 300
Joined: Wed Nov 18, 2009 9:09 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: Orlando, Florida
Contact:

Re: Can't add Gungans [Solved]

Post by DarthHamster »

Ahhh I get it. Thanks.
Post Reply