Lloyd Logan Posted January 16, 2013 Share Posted January 16, 2013 (edited) So, i cant get this to work? To get the players login data? test = dbConnect( "mysql", "dbname=test;host=127.0.0.1", "root", "") function makeadminnow(thePlayer) local name = getAccountName(thePlayer) dbExec ( test, "UPDATE `accounts` SET `admin` = '12' WHERE `username` = ".. name .."" ) outputChatBox("You are now admin!", thePlayer) end addCommandHandler("makemeadmin", makeadminnow) Edited January 16, 2013 by Guest Link to comment
Anderl Posted January 16, 2013 Share Posted January 16, 2013 Function parameter doesn't make any sense, why are you using getLocalPlayer function as a parameter name? And then you use "thePlayer" in outputChatBox which isn't even declared anywhere? Link to comment
Lloyd Logan Posted January 16, 2013 Author Share Posted January 16, 2013 Function parameter doesn't make any sense, why are you using getLocalPlayer function as a parameter name? And then you use "thePlayer" in outputChatBox which isn't even declared anywhere? Sorry, my fault. I tried to edit it, but it didn't work. I forgot to change it back I'll change the OP 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