BriGhtx3 Posted May 20, 2011 Share Posted May 20, 2011 local result = mysql_query(sqlcon, "INSERT INTO user_data SET Username='"..mysql_escape_string(sqlcon, username).."', Password='"..md5(password).."', EMail='"..mysql_escape_string(sqlcon,email).."', Fraktion='0', Skin='15', Rank='0', Spawn='0', Job='0', Materials='0', Drugs='0', LicA='0', LicB='0', LicC='0', Money='150', Bank='1500', Adminlevel='0', PlayedM='0', PlayedH='0', Wanted='0', Jailtime='0', Slot1='Frei', Slot2='Frei', Slot3='Frei', Slot4='Frei', Slot5='Frei', Slot6='Frei', Slot7='Frei', Slot8='Frei', Slot9='Frei', Slot10='Frei', Housekey='255';") mysql_free_result(result) result = mysql_query(sqlcon,"SELECT * FROM user_data WHERE Username='"..mysql_escape_string( sqlcon, username ).."';") if mysql_num_rows( result ) == 1 then row = mysql_fetch_row(result) else outputChatBox( "Der Account konnte nicht erfolgreich erstellt werden, bitte kontaktiere einen Admin", source ) end mysql_free_result(result) This is my Code, but it doesn't works because there is a error : bad argument #1 to 'mysql_free_result' (Luabook.MysqlResult expected, got nil) Link to comment
BriGhtx3 Posted May 20, 2011 Author Share Posted May 20, 2011 PROBLEM SOLVED! I had to remove Housekey because it has a nil value in the database! 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