Page 13 of 16
Re: BA Chicken Defense V2.15 (BA720)
Posted: 26 Jul 2011, 01:47
by Jazcash
dcore221 wrote:
how about you put some work in Beherith?
Lol you're a moron.
Re: BA Chicken Defense V2.15 (BA720)
Posted: 26 Jul 2011, 08:36
by very_bad_soldier
@smoth:
Teaching people how to act in forums while calling them assholes and stuff in every second post is a bit funny, no?
Re: BA Chicken Defense V2.15 (BA720)
Posted: 26 Jul 2011, 11:37
by dcore221
how to fix this?
[f=0000000] Failed to load: unit_spawner_defense.lua ([string "LuaRules/Gadgets/unit_spawner_defense.lua"]:271: attempt to index field '?' (a nil value))
Re: BA Chicken Defense V2.15 (BA720)
Posted: 26 Jul 2011, 14:13
by smoth
Ok, here is the first part. how to find errors
[f=0000000] Failed to load: unit_spawner_defense.lua ([string "LuaRules/Gadgets/unit_spawner_defense.lua"]:271: attempt to index field '?' (a nil value))
The code file
The line in question
Get this and use it to open the lua file.
now you will see numbers on the left, you will go to line 271 and paste it here. I can then show you what is what.
Re: BA Chicken Defense V2.15 (BA720)
Posted: 26 Jul 2011, 15:46
by Super Mario
smoth wrote:Ok, here is the first part. how to find errors
[f=0000000] Failed to load: unit_spawner_defense.lua ([string "LuaRules/Gadgets/unit_spawner_defense.lua"]:271: attempt to index field '?' (a nil value))
The code file
The line in question
Get this and use it to open the lua file.
now you will see numbers on the left, you will go to line 271 and paste it here. I can then show you what is what.
Pro tip: it's a lot easier to fix the problem for yourself than to have some else to fix issue for themselves.
Re: BA Chicken Defense V2.15 (BA720)
Posted: 26 Jul 2011, 15:49
by dcore221
Thanks
Code: Select all
270| for unitName in pairs(chickenTypes) do
271| chickenDefTypes[UnitDefNames[unitName].id] = unitName
272| unitCounts[string.sub(unitName,1,-2)] = {count = 0, lastCount = 0}
273| end
Re: BA Chicken Defense V2.15 (BA720)
Posted: 26 Jul 2011, 16:08
by smoth
Super Mario wrote:Pro tip: it's a lot easier to fix the problem for yourself than to have some else to fix issue for themselves.
I don't have any issues, gundam's spawner ai works, you mad?
dcore221 wrote:Thanks
Code: Select all
270| for unitName in pairs(chickenTypes) do
271| chickenDefTypes[UnitDefNames[unitName].id] = unitName
272| unitCounts[string.sub(unitName,1,-2)] = {count = 0, lastCount = 0}
273| end
I would bet that you are missing some or all of the chicken unit defs.
So put this above line 271.
Spring.Echo("unit names with resulting id")
Spring.Echo(unitName,UnitDefNames[unitName].id)
This will print the ckicken names and nil when they cannot be found into infolog
Paste me the relevant lines from your infolog
Re: BA Chicken Defense V2.15 (BA720)
Posted: 26 Jul 2011, 16:36
by dcore221
Code: Select all
[f=0000000] chicken_dodo2, 185
[f=0000000] unit names with resulting id
[f=0000000] Failed to load: unit_spawner_defense.lua ([string "LuaRules/Gadgets/unit_spawner_defense.lua"]:272: attempt to index field '?' (a nil value))
Re: BA Chicken Defense V2.15 (BA720)
Posted: 26 Jul 2011, 16:39
by smoth
*edit*
Better yet:
Spring.Echo(unitName,UnitDefNames[unitName].id)
Change to
Spring.Echo(unitName)
Spring.Echo(UnitDefNames[unitName].id)
And give me that result :)
Re: BA Chicken Defense V2.15 (BA720)
Posted: 26 Jul 2011, 16:48
by dcore221
Code: Select all
[f=0000000] unit names with resulting id
[f=0000000] chicken_dodo2
[f=0000000] 185
[f=0000000] unit names with resulting id
[f=0000000] chickena2
Re: BA Chicken Defense V2.15 (BA720)
Posted: 26 Jul 2011, 16:53
by smoth
And it errors after that?
Re: BA Chicken Defense V2.15 (BA720)
Posted: 26 Jul 2011, 17:11
by dcore221
full infolog:
http://pastebin.com/zsZeN2pz
was you expecting the missing units to be from ba?
could it be that chickens is linked a weapon or explosion that has been changed?
sorry im a total noob at this sort of thing :]
i have tried removing dodo2 and chickena2 to no avail
does the 185 indicate the number of units that are having problems?
Re: BA Chicken Defense V2.15 (BA720)
Posted: 26 Jul 2011, 17:16
by smoth
The number is the unit id dodo is ok because he has one
You are erroring because chickena2 doesn't have one yes
This means chickena2 is possibly broken
Easy test
Start the game
/cheat
/give chickena2
If the unit exists it will spawn, I reckon it won't though.
Re: BA Chicken Defense V2.15 (BA720)
Posted: 26 Jul 2011, 17:29
by dcore221
yup
[f=0002281] /give chickena2
[f=0002281] Couldnt find wreckage info chickena2
[f=0002281] chickena2 is not a valid unitname
same for chickena1
Re: BA Chicken Defense V2.15 (BA720)
Posted: 26 Jul 2011, 17:37
by smoth
So now we are somewhere.
Things to check:
Weapon name
Unit movedef
Unit model
It is a pretty long list
So for now:
Look in the file and replace any chicken a1 or a2 with the dodo name and see if that runs. First let's get it running then you can recruit help in tracking the erroneous chickens down :)
Re: BA Chicken Defense V2.15 (BA720)
Posted: 26 Jul 2011, 18:08
by dcore221
ok the bad units...
chickena1
chickena2
chickenp1
chickenr1
chickenr2
chickenr3
the mod now starts and the chicken panel shows but no chickens spawn just a commander
and a new error
Code: Select all
[f=0000000] unit names with resulting id
[f=0000000] chickenh3
[f=0000000] 191
[f=0000000] unit names with resulting id
[f=0000000] chickens1
[f=0000000] 194
[f=0000000] unit names with resulting id
[f=0000000] chickenh4
[f=0000000] 192
[f=0000000] unit names with resulting id
[f=0000000] chickenc1
[f=0000000] 186
[f=0000000] unit names with resulting id
[f=0000000] chickenf1
[f=0000000] 188
[f=0000000] unit names with resulting id
[f=0000000] chickenh1
[f=0000000] 189
[f=0000000] unit names with resulting id
[f=0000000] chicken_dodo1
[f=0000000] 184
[f=0000000] unit names with resulting id
[f=0000000] chickenh2
[f=0000000] 190
[f=0000000] unit names with resulting id
[f=0000000] chickenw1
[f=0000000] 196
[f=0000000] unit names with resulting id
[f=0000000] chickens2
[f=0000000] 195
[f=0000000] unit names with resulting id
[f=0000000] chicken1
[f=0000000] 182
[f=0000000] unit names with resulting id
[f=0000000] chicken2
[f=0000000] 183
[f=0000000] unit names with resulting id
[f=0000000] chicken_dodo2
[f=0000000] 185
[f=0000000] Failed to load: unit_spawner_defense.lua ([string "LuaRules/Gadgets/unit_spawner_defense.lua"]:340: attempt to index field 'juno_pulse' (a nil value))
line 340:
Code: Select all
local JUNO = WeaponDefNames["juno_pulse"].id
Re: BA Chicken Defense V2.15 (BA720)
Posted: 26 Jul 2011, 18:20
by smoth
Look in /weapons/ see if you can track the file down.
Things are picking up at work so I have to leave and let you fiddle with this
Re: BA Chicken Defense V2.15 (BA720)
Posted: 26 Jul 2011, 18:38
by dcore221
ok thanks for the help :]
Re: BA Chicken Defense V2.15 (BA720)
Posted: 26 Jul 2011, 20:40
by smoth
Don't forget to post when you get stuck so others can try and help you
Re: BA Chicken Defense V2.15 (BA720)
Posted: 26 Jul 2011, 21:52
by dcore221
juno_pulse error fixed - i copied juno_pulse from ba720.sdz>weapons>weapons.tdf and created JUNO_PULSE.tdf
the game now starts with no errors but after it counts down the chicken commander (who is normally hidden) explodes then the "You lost the game" message appears, the game continues to spawn chickens
also my team spawns 2 commanders
any ideas?