GhostXoP Posted June 15, 2012 Share Posted June 15, 2012 From looking at the error.. (part of the string) doesnt work, because even if you specify the value when creating the table in the data base as a NUMBER it still expects a string, so 0 would have to be "0". Correct? P.S. The function using the image above was dbExec Inserting a value into the database, also note that is only part of the string. there is an INSERT INTO etc Link to comment
TwiX! Posted June 15, 2012 Share Posted June 15, 2012 From looking at the error.. (part of the string) doesnt work, because even if you specify the value when creating the table in the data base as a NUMBER it still expects a string, so 0 would have to be "0". Correct? P.S. The function using the image above was dbExec Inserting a value into the database, also note that is only part of the string. there is an INSERT INTO etc Fluent in Lua ... what its '0' ? in your code? Link to comment
GhostXoP Posted June 15, 2012 Author Share Posted June 15, 2012 Your misunderstanding of my simply put question proves to tell the public not to trust you as a scripter for their server. If you don't know what a value is, should you re-read an introduction to Lua? To your off-topic question, 0 is a value. Not a string. "0" is a character, its value is 48. If you read my question and understood it, as per someone who would understand the Lua language, you would know that i asked if SQLite takes a number value, rather then a string value even when stated in the Database table that the type of value should be a number value rather then a string. Second grade enough for you? Link to comment
Castillo Posted June 15, 2012 Share Posted June 15, 2012 You can't use a number to define a variable in Lua. Link to comment
GhostXoP Posted June 15, 2012 Author Share Posted June 15, 2012 I'm inputting a constant value, not a variable the zero above is the equivilant to function myFunction(var) print(var) end myFunction(0) Link to comment
Castillo Posted June 15, 2012 Share Posted June 15, 2012 Then why you're using '0' in your query? shouldn't you use the argument instead? Link to comment
GhostXoP Posted June 15, 2012 Author Share Posted June 15, 2012 The column in the table is a NUMBER value, my question was, is it expecting a number string? or number value? 0 or "0" In the tutorials i had seen, TEXT defined that the column would expect TEXT or "text" and NUMBER expecting 0, unless its expecting a "0". Is it expecting ", 0 ," (part of other arguments) or ",".. 0 .."," note, ones a string, the other is a string, a value 0, and other part of the string Link to comment
GhostXoP Posted June 15, 2012 Author Share Posted June 15, 2012 Nevermind, i have figured a way around what i am looking for. Thank you for your responses. Link to comment
TwiX! Posted June 15, 2012 Share Posted June 15, 2012 Your misunderstanding of my simply put question proves to tell the public not to trust you as a scripter for their server. If you don't know what a value is, should you re-read an introduction to Lua? To your off-topic question, 0 is a value. Not a string. "0" is a character, its value is 48. If you read my question and understood it, as per someone who would understand the Lua language, you would know that i asked if SQLite takes a number value, rather then a string value even when stated in the Database table that the type of value should be a number value rather then a string. Second grade enough for you? maybe 0 its variable there arithmetic functions, maybe you check topic how make request here? how i can know what its not just number or variable? maybe your logic is fucked and you use 0 as other mathematical values? and as Solidsnake14 said You can't use a number to define a variable in Lua. --Edit, have not seen other posts,did not refresh the page Link to comment
GhostXoP Posted June 15, 2012 Author Share Posted June 15, 2012 maybe 0 its variable there arithmetic functions, maybe you check topic how make request here? English isn't your first language is it? Id first like to apologize for snapping at you. Its impolite and unprofessional. As for your post, i had expected everyone to believe it was a value being passed as an argument to a function, not as the variable place holder for arguments to be passed to. You probably thought i meant function MyFunction(0) end Ofcourse, numbers cannot be variable names as they represent constant values. What i meant MyFunction(0) I had fixed my problem however, strings in strings, with variables and values got a little confusing and i had cleared it up. Now the user logs in. 0 isnt anything else, if you see 0 in lua, its usually a constant value knowing it cannot name anything other then the index to a table, or just a value being assigned Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now