HustraDev Posted February 5, 2016 Posted February 5, 2016 i have problem in this code acc = getPlayerAccount(source) connection = dbConnect( "sqlite", "database.db" ) dbExec( connection, "INSERT INTO VList VALUES(account,id,name,price)", "ss",22,"sso",9876782) > i want to insert into [ VList ] table a row's that include [ acc ] that is a Player account how i can do that?
Overkillz Posted February 5, 2016 Posted February 5, 2016 Im not an exper (Im noob at db functions) but maybe this could be usefull dbExec( connection, "INSERT INTO `VList` (`colum1`, `colum2`) VALUES (`"..value1.."`,`"..value1.."`)" ) Sorry if it didn help u. Regards.
HustraDev Posted February 5, 2016 Author Posted February 5, 2016 i'm getting this !!> ERROR: rolePlayLy-VehicleSystem\server.lua:11: attempt to concatenate global 'acc' (a boolean value)
Enargy, Posted February 5, 2016 Posted February 5, 2016 Booleans are not an avaible values as parameters I guess.
Dealman Posted February 5, 2016 Posted February 5, 2016 getPlayerAccount is returning false, make sure source is a player and that they are not a guest account. Also, you'll want to get the account name - not the element itself as it would return userdata, not a string with the name.
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