BA Chicken Defense V2.56 (BA7.81) - Page 13

BA Chicken Defense V2.56 (BA7.81)

Classic game design, maintained to please you...

Moderator: Content Developer

User avatar
Jazcash
Posts: 5302
Joined: 08 Dec 2007, 17:39

Re: BA Chicken Defense V2.15 (BA720)

Post by Jazcash »

dcore221 wrote: how about you put some work in Beherith? :?
Lol you're a moron.
0 x

User avatar
very_bad_soldier
Posts: 1384
Joined: 20 Feb 2007, 01:10

Re: BA Chicken Defense V2.15 (BA720)

Post 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?
0 x

User avatar
dcore221
Posts: 110
Joined: 09 Jul 2010, 19:53

Re: BA Chicken Defense V2.15 (BA720)

Post 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))
0 x

User avatar
smoth
Posts: 22300
Joined: 13 Jan 2005, 00:46

Re: BA Chicken Defense V2.15 (BA720)

Post 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.
0 x

Super Mario
Posts: 815
Joined: 21 Oct 2008, 02:54

Re: BA Chicken Defense V2.15 (BA720)

Post 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.
0 x

User avatar
dcore221
Posts: 110
Joined: 09 Jul 2010, 19:53

Re: BA Chicken Defense V2.15 (BA720)

Post 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
0 x

User avatar
smoth
Posts: 22300
Joined: 13 Jan 2005, 00:46

Re: BA Chicken Defense V2.15 (BA720)

Post 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
0 x

User avatar
dcore221
Posts: 110
Joined: 09 Jul 2010, 19:53

Re: BA Chicken Defense V2.15 (BA720)

Post 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))
0 x

User avatar
smoth
Posts: 22300
Joined: 13 Jan 2005, 00:46

Re: BA Chicken Defense V2.15 (BA720)

Post 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 :)
0 x

User avatar
dcore221
Posts: 110
Joined: 09 Jul 2010, 19:53

Re: BA Chicken Defense V2.15 (BA720)

Post 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
0 x

User avatar
smoth
Posts: 22300
Joined: 13 Jan 2005, 00:46

Re: BA Chicken Defense V2.15 (BA720)

Post by smoth »

And it errors after that?
0 x

User avatar
dcore221
Posts: 110
Joined: 09 Jul 2010, 19:53

Re: BA Chicken Defense V2.15 (BA720)

Post 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?
0 x

User avatar
smoth
Posts: 22300
Joined: 13 Jan 2005, 00:46

Re: BA Chicken Defense V2.15 (BA720)

Post 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.
0 x

User avatar
dcore221
Posts: 110
Joined: 09 Jul 2010, 19:53

Re: BA Chicken Defense V2.15 (BA720)

Post 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
0 x

User avatar
smoth
Posts: 22300
Joined: 13 Jan 2005, 00:46

Re: BA Chicken Defense V2.15 (BA720)

Post 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 :)
0 x

User avatar
dcore221
Posts: 110
Joined: 09 Jul 2010, 19:53

Re: BA Chicken Defense V2.15 (BA720)

Post 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
0 x

User avatar
smoth
Posts: 22300
Joined: 13 Jan 2005, 00:46

Re: BA Chicken Defense V2.15 (BA720)

Post 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
0 x

User avatar
dcore221
Posts: 110
Joined: 09 Jul 2010, 19:53

Re: BA Chicken Defense V2.15 (BA720)

Post by dcore221 »

ok thanks for the help :]
0 x

User avatar
smoth
Posts: 22300
Joined: 13 Jan 2005, 00:46

Re: BA Chicken Defense V2.15 (BA720)

Post by smoth »

Don't forget to post when you get stuck so others can try and help you
0 x

User avatar
dcore221
Posts: 110
Joined: 09 Jul 2010, 19:53

Re: BA Chicken Defense V2.15 (BA720)

Post 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?
0 x

Post Reply

Return to “Balanced Annihilation”