Does anyone know my problem?
Adding units to space
Moderator: Moderators
- 1FGR1NightGhost
- Don't feed the troll (that's me)
- Posts: 85
- Joined: Wed Jun 08, 2011 12:01 pm
- Projects :: Bornesia Kastarian Docks
- xbox live or psn: No gamertag set
Adding units to space
Ok, this is the script function i copied from a hero assault and added to my map
And when i munge i get that stupid "expecting Bracket" crap that makes my map crash/freeze/ load a blank map
Does anyone know my problem?
Hidden/Spoiler:
Does anyone know my problem?
-
Darth_Spiderpig
- Sith Master

- Posts: 2631
- Joined: Fri Mar 27, 2009 10:23 am
- Projects :: Something cool...
- xbox live or psn: Has no xbox....Yup
- Location: Does whatever a Spiderpig does
- Contact:
Re: Adding units to space
You're missing a bracket somewhere, as the crap says.
- AceMastermind
- Gametoast Staff

- Posts: 3285
- Joined: Mon Aug 21, 2006 6:23 am
- Contact:
Re: Adding units to space
When asking for help you should always post the exact errors you get when you encounter crashes. You only posted a snippet of your LUA so is the missing bracket error the only one? It looks like you're copying and pasting code without regard as to whether it works or not.
Try this instead:
You should use a code editor that has syntax highlighting when editing LUA files so you can instantly identify these typos. Also, when you get munge errors there is no need to play your map, it didn't munge correctly and is therefore broken; munge errors must be fixed first.
Try this instead:
Brackets will always be paired up, 1 open and 1 close bracket. If you see an odd number of brackets in a block then something is wrong.myTeamConfig = {
all = {
team = ALL,
units = 32,
reinforcements = -1,
pilot = { "reb_inf_pilot",26},
marine = { "reb_inf_marine",6},
},
imp = {
team = IMP,
units = 32,
reinforcements = -1,
pilot = { "sto_inf_pilot",26},
marine = { "sto_inf_marine",6},
}
}
AddUnitClass(IMP,"sto_inf_defense", 1,2)
AddUnitClass(IMP,"sto_inf_officer_space", 1,2)
AddUnitClass(ALL,"reb_inf_defense", 1,2)
AddUnitClass(ALL,"reb_inf_officer_space", 1,2)
You should use a code editor that has syntax highlighting when editing LUA files so you can instantly identify these typos. Also, when you get munge errors there is no need to play your map, it didn't munge correctly and is therefore broken; munge errors must be fixed first.
- 1FGR1NightGhost
- Don't feed the troll (that's me)
- Posts: 85
- Joined: Wed Jun 08, 2011 12:01 pm
- Projects :: Bornesia Kastarian Docks
- xbox live or psn: No gamertag set
Re: Adding units to space
Thx, that script fixed the munge error problem, but failed to add the additional gaurds and commanders....
- AceMastermind
- Gametoast Staff

- Posts: 3285
- Joined: Mon Aug 21, 2006 6:23 am
- Contact:
Re: Adding units to space
You only posted part of your script and you didn't provide enough details of what you've done so far, you get what you put into it. Did you actually load these new units in the ReadDataFile section? There are standard procedures for adding new units and it sounds like you didn't follow the process correctly.1FGR1NightGhost wrote:...that script ... failed to add the additional gaurds and commanders...
- 1FGR1NightGhost
- Don't feed the troll (that's me)
- Posts: 85
- Joined: Wed Jun 08, 2011 12:01 pm
- Projects :: Bornesia Kastarian Docks
- xbox live or psn: No gamertag set
Re: Adding units to space
sorry for that...
but if you want the whole crap load of info here it is:
but if you want the whole crap load of info here it is:
Hidden/Spoiler:
- AceMastermind
- Gametoast Staff

- Posts: 3285
- Joined: Mon Aug 21, 2006 6:23 am
- Contact:
Re: Adding units to space
There are no stock sto or reb side lvls; you are trying to add custom sides and therefore need to follow the procedure in THIS thread.1FGR1NightGhost wrote:...
...
ReadDataFile("SIDE\\reb.lvl",
"reb_inf_pilot",
"reb_inf_defense_urban",
"reb_inf_marine",
"reb_inf_officer_space",
"all_fly_kwing",
"reb_fly_bwing",
"reb_fly_tierouge")
...
...
...
ReadDataFile("SIDE\\sto.lvl",
"sto_inf_pilot",
"sto_inf_defense",
"sto_inf_marine",
"sto_inf_officer_space",
"sto_fly_tiedefender",
"sto_fly_tiestriker")
...
...
- 1FGR1NightGhost
- Don't feed the troll (that's me)
- Posts: 85
- Joined: Wed Jun 08, 2011 12:01 pm
- Projects :: Bornesia Kastarian Docks
- xbox live or psn: No gamertag set
Re: Adding units to space
I know, i placed the sides in the DEFAULT lvl PC folder (along with rep, cis, and imp) so i know its not that because it has no problem reading the Imperial Pilot, Rebel Pilot, Imperial Marine, or K-wing (rebel marine and TIE Rouge havent been made yet, and the 2 new TIEs are riddled with problems unrelated to the scripts...)AceMastermind wrote:There are no stock sto or reb side lvls; you are trying to add custom sides and therefore need to follow the procedure in THIS thread.
I think ill just stick to the pilot and marine, thx for the help though...
- AceMastermind
- Gametoast Staff

- Posts: 3285
- Joined: Mon Aug 21, 2006 6:23 am
- Contact:
Re: Adding units to space
That kind of information should've been included in your first post.1FGR1NightGhost wrote:...i placed the sides in the DEFAULT lvl PC folder (along with rep, cis, and imp)...
If you moved the custom side lvls to the game's DATA\_LVL_PC\SIDE folder and the units still don't show up ingame then there is a problem with how you set up those sides to begin with, maybe a typo in the req etc. You should play your map and generate a BFront2.log to see if any suspicious errors come up.
- 1FGR1NightGhost
- Don't feed the troll (that's me)
- Posts: 85
- Joined: Wed Jun 08, 2011 12:01 pm
- Projects :: Bornesia Kastarian Docks
- xbox live or psn: No gamertag set
Re: Adding units to space
Sorry if i left that part outAceMastermind wrote:That kind of information should've been included in your first post.1FGR1NightGhost wrote:...i placed the sides in the DEFAULT lvl PC folder (along with rep, cis, and imp)...
If you moved the custom side lvls to the game's DATA\_LVL_PC\SIDE folder and the units still don't show up ingame then there is a problem with how you set up those sides to begin with, maybe a typo in the req etc. You should play your map and generate a BFront2.log to see if any suspicious errors come up.
Its not the sides, cus i know the units work (cus they all work on ground maps and test map) and if it werent reading the side, then why would the pilots, imp marine and K-wing all still show up?
- DarthD.U.C.K.
- Master of the Force

- Posts: 6027
- Joined: Wed Sep 27, 2006 11:05 am
- Location: Duckburg, Germany
Re: Adding units to space
please make a bfron2log and post it here. you always have to give us as much information as you can in your first post already so that helpthreads dont get unnecessarily lengthy.
so do the units that dont appear in the spacemap appear in the groundmaps?
you should fit the number of the individual units to the number of all units, right now you have 32 units per side with pilot and marine already taking up 32. since they dont have a minimumnumber they might simply take up all slots and prevent the other units from spawning.
so do the units that dont appear in the spacemap appear in the groundmaps?
you should fit the number of the individual units to the number of all units, right now you have 32 units per side with pilot and marine already taking up 32. since they dont have a minimumnumber they might simply take up all slots and prevent the other units from spawning.
- 1FGR1NightGhost
- Don't feed the troll (that's me)
- Posts: 85
- Joined: Wed Jun 08, 2011 12:01 pm
- Projects :: Bornesia Kastarian Docks
- xbox live or psn: No gamertag set
Re: Adding units to space
@Darth D.U.C.K. wouldnt that just make AI not spawn as gaurds or ship commanders?
And, as i now realized i have failed to state, my problem is that i cant get THE ADDITIONAL 2 (added) units to appear, and i know it is not the units themselves because they work on ground maps, and when i rotate them in the scripts with the pilot or marine
And, as i now realized i have failed to state, my problem is that i cant get THE ADDITIONAL 2 (added) units to appear, and i know it is not the units themselves because they work on ground maps, and when i rotate them in the scripts with the pilot or marine
- AceMastermind
- Gametoast Staff

- Posts: 3285
- Joined: Mon Aug 21, 2006 6:23 am
- Contact:
Re: Adding units to space
You can also use these to include additional units instead of AddUnitClass:1FGR1NightGhost wrote:...i know it is not the units themselves because they work on ground maps, and when i rotate them in the scripts with the pilot or marine
soldier
assault
sniper
engineer
officer
special
Also,
You should play your map and generate a BFront2.log to see if any suspicious errors come up.
