Page 1 of 1

[FIXED]Namepicker not returning any names.

Posted: Sun Jul 24, 2016 12:55 pm
by Pangit
Hi, I had the one second name table working before, but when I added the others and put in the if statements I no longer get any response from the library. Everything runs but name.lua seems to be returning nil for both first and last name.

The function should be called with the arguments (gender, race). the library has an if ladder and it selects the correct numbers to use to randomise a result based on the parameter. It will also select the right secondname table to use based on the race parameter.

It should finish by returning a table containing two strings first and second.

Could I get some help getting this working please. I think its something to do with how I am passing parameters to the library.

What I would like to do is type in newName("M", "ASIAN") and get my list of npcs. or perhaps another time newName("F", "BLACK") ect...

I have included the love file for y'all to take a look at.
namepicker.love
(102.65 KiB) Downloaded 32 times

Re: Namepicker not returning any names.

Posted: Sun Jul 24, 2016 4:18 pm
by whiteland92
i made a small gif shoving what you did wrong :3
http://i.imgur.com/R2G6Fgg.gif

Re: Namepicker not returning any names.

Posted: Sun Jul 24, 2016 10:49 pm
by Pangit
Thank you fella, thanks to your help - everything is now working fine. Lol something so obvious escaped me. Ah well it was late Sunday :? That is my excuse and I am sticking to it haha.