Well, the beauty of the code I gave you is you don’t need any SQL knowledge. All you need to know is that using addReactionTime(playerName, playerAge, playerTime) records your data and getScores() retrieves it for you.
Looks like what you are doing above is probably copied from the documents. Scrap that code. What you need are two text boxes and a button. The user types in their age and name and clicks the button, which then saves the data. Think of it just like when you sign up for something or you are entering a username/password. example:
[lua]-- create the text fields and button
txtName = native.newTextField( 85, 45, 50, 30 )
txtAge = native.newTextField( 85, 45, 50, 60 )
btnSave = widget.newButton{
label=“Play”,
labelColor = { default={0}, over={255} },
fontSize = 25,
width=100, height=50,
onRelease = onSaveClick – event listener function
}
btnSave.x = display.contentWidth /2
btnSave.y = 90
– the event that is fired when you press the button
function onSaveClick(event)
–get the name text and put it in a variable
local playerName = txtName.text
local playerAge = txtAge.text
–the last variable is their reaction time, which you should stored in a variable already, lets call it playerReactionTime.
addReactionTime(playerName, playerAge, playerReactionTime)
end[/lua]
I would suggest that your users enter this information after they have already had their reaction time tested. [import]uid: 147305 topic_id: 30943 reply_id: 123770[/import]