table index nil, what have i done wrong with it?

Have a really dumb question? Ask it here to get help from the experts (or those with too much time on their hands)

Moderator: Moderator

Post Reply
Message
Author
xnd
Archmage
Posts: 307
Joined: Sat Mar 21, 2015 7:33 pm

table index nil, what have i done wrong with it?

#1 Post by xnd »

Lua Error: /engine/Birther.lua:46: /data-Chrono_Xorn/birth/races/Chrono_Xorn.lua:80: table index is nil
At [C]:-1
At [C]:-1 error
At /engine/Birther.lua:46 loadDefinition
At /hooks/Chrono_Xorn/load.lua:11
At [string "return function(l, self, data) local ok=false..."]:1
At /mod/load.lua:271
At [C]:-1 require
At /engine/Module.lua:160 load
At /engine/Module.lua:955 instanciate
At /engine/utils.lua:2197 showMainMenu
At /engine/init.lua:162
At [C]:-1 dofile
At /loader/init.lua:204


http://pastebin.com/i5yvu8k5

HousePet
Perspiring Physicist
Posts: 6215
Joined: Sun Sep 09, 2012 7:43 am

Re: table index nil, what have i done wrong with it?

#2 Post by HousePet »

It means there is no talent with that ID.
My feedback meter decays into coding. Give me feedback and I make mods.

xnd
Archmage
Posts: 307
Joined: Sat Mar 21, 2015 7:33 pm

Re: table index nil, what have i done wrong with it?

#3 Post by xnd »

but i gave it an id just like all the others have.

shortname = "X_SENSE",

can you say why it thinks it has no id?

i tried putting it into different talent types also.

HousePet
Perspiring Physicist
Posts: 6215
Joined: Sun Sep 09, 2012 7:43 am

Re: table index nil, what have i done wrong with it?

#4 Post by HousePet »

Most likely, that talent isn't being loaded.
My feedback meter decays into coding. Give me feedback and I make mods.

xnd
Archmage
Posts: 307
Joined: Sat Mar 21, 2015 7:33 pm

Re: table index nil, what have i done wrong with it?

#5 Post by xnd »

well, this attempt at coding is completely impossible for me.

every tiny thing completely wrecks it.

Almost any little thing I try to do with any talent at all I am getting totally blocked.

I copy a talent without even touching it and I get told there is an "unexpected symbol near ',' ". this has just become miserable, so I'll have to give up.

If someone doesnt want to help with this, its impossible for me to figure it out. There was a bunch of stuff I wanted to try to include, but I am just totally clueless at it.

HousePet
Perspiring Physicist
Posts: 6215
Joined: Sun Sep 09, 2012 7:43 am

Re: table index nil, what have i done wrong with it?

#6 Post by HousePet »

You were definitely very ambitious.
Go for something much simpler to get used to how to addon before trying the crazily complex stuff.
My feedback meter decays into coding. Give me feedback and I make mods.

twas Brillig
Wyrmic
Posts: 279
Joined: Sun Nov 30, 2014 9:06 pm

Re: table index nil, what have i done wrong with it?

#7 Post by twas Brillig »

And if that doesn't do it, see if you can't dig up some general LUA tutorials. If you're getting frustrated by unintuitive syntax stuff, that might be more helpful than try the slap-chop method.

xnd
Archmage
Posts: 307
Joined: Sat Mar 21, 2015 7:33 pm

Re: table index nil, what have i done wrong with it?

#8 Post by xnd »

if I take two talents, copy them without touching the code, and put in the simple shortname and race req, simple stuff, and then one loads fine and the other gives me table nil, they look the same to me, no one knows why this happens? i have another that it does it.

[ActorTalents.T_HERE_THEY_COME] = 1,
[ActorTalents.T_NEMESIS] = 1,

the second one is table nil.

this is the only part i touched:


shortname = "NEMESIS",
name = "The Bad One Must Be Defeated",
type = {"race/Chrono_Xorn", 1},
image = "talents/cease_to_exist.png",
anomaly_type = "major",
require = racial_req1,
no_npc_use = true,


and here it is from the one that works fine:

shortname = "HERE_THEY_COME",
name = "Here They Come",
type = {"race/Chrono_Xorn", 1},
image = "talents/vimsense.png",
anomaly_type = "major",
require = racial_req1,


what lua tutorial would explain this?
it look identical to me.
why is one a table nil?

0player
Uruivellas
Posts: 717
Joined: Fri May 24, 2013 4:27 pm

Re: table index nil, what have i done wrong with it?

#9 Post by 0player »

Oh heh, anomaly type? :D
Are you sure your talent is loaded at all, for starters?

xnd
Archmage
Posts: 307
Joined: Sat Mar 21, 2015 7:33 pm

Re: table index nil, what have i done wrong with it?

#10 Post by xnd »

yes....

i said the one works, and that one opens the portal the horrors come through. the one giving the table nil is the evil clone one.

the table nil that started this thread was not anomaly.

all the anomaly info is copied right into the race's talent file so any anomaly just gets the info right there. something else is causing the table nil errors.

--

I also have other talent errors, like I can load talents in the class file and they will be there functioning on the character but not on the upgrade page of talents.
talent_types = {
["technique/combat-training"]={true, 0.3},

},
talents = {
[ActorTalents.T_ARMOUR_TRAINING] = 1,
},
}

--

xnd
Archmage
Posts: 307
Joined: Sat Mar 21, 2015 7:33 pm

Re: table index nil, what have i done wrong with it?

#11 Post by xnd »

removing some of my changes got rid of this table nil error though I dont know why and still have another error:

removed:

shortname = "NEMESIS",
name = "The Bad One Must Be Defeated",
type = {"race/Chrono_Xorn", 1},
image = "talents/cease_to_exist.png",
anomaly_type = "major",
require = racial_req1,
no_npc_use = true,

for this:

short_name = "NEMESIS_X",
name = "Anomaly Evil Twin2",
type = {"race/Chrono_Xorn", 1},
anomaly_type = "major",
type_no_req = true,

so i dont see what breaks it in what I did since what I did has been done for others. maybe its the underbar in the name now? i dont see anything there that is not in other talents.

it still gives me an error when it is clicked on though, saying "attempt to call global 'makeParadoxClone' (a nil value)".

but even if i make it work, I would rather it be something that happens on its own every so often, rather than just a button to push to summon the bad one. it was supposed to occur on its own once in a while.

Post Reply