Page 1 of 1

Can't add Gungans [Solved]

Posted: Wed Dec 02, 2009 11:10 pm
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

Re: Can't add Gungans

Posted: Wed Dec 02, 2009 11:14 pm
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)

Re: Can't add Gungans

Posted: Wed Dec 02, 2009 11:17 pm
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"}

Re: Can't add Gungans

Posted: Wed Dec 02, 2009 11:20 pm
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")

Re: Can't add Gungans

Posted: Wed Dec 02, 2009 11:35 pm
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

Re: Can't add Gungans

Posted: Wed Dec 02, 2009 11:44 pm
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)

Re: Can't add Gungans [Solved]

Posted: Wed Dec 02, 2009 11:53 pm
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

Re: Can't add Gungans [Solved]

Posted: Thu Dec 03, 2009 12:02 am
by DarthHamster
Ahhh I get it. Thanks.