[FIXED]Namepicker not returning any names.

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
Pangit
Party member
Posts: 148
Joined: Thu Jun 16, 2016 9:20 am

[FIXED]Namepicker not returning any names.

Post by Pangit » Sun Jul 24, 2016 12:55 pm

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 30 times
Last edited by Pangit on Sun Jul 24, 2016 11:44 pm, edited 1 time in total.

User avatar
whiteland92
Prole
Posts: 12
Joined: Fri Jul 04, 2014 1:30 am

Re: Namepicker not returning any names.

Post by whiteland92 » Sun Jul 24, 2016 4:18 pm

i made a small gif shoving what you did wrong :3
http://i.imgur.com/R2G6Fgg.gif

User avatar
Pangit
Party member
Posts: 148
Joined: Thu Jun 16, 2016 9:20 am

Re: Namepicker not returning any names.

Post by Pangit » Sun Jul 24, 2016 10:49 pm

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.

Post Reply

Who is online

Users browsing this forum: nikneym and 26 guests