22.12.2014, 04:25
I am trying to use mysql_query(query);
on this code.
But for some reason i get the error "error 035: argument type mismatch (argument 1)".
How can i fix this?
on this code.
Код:
public OnPlayerConnect(playerid) { new query[126], pName[MAX_PLAYER_NAME]; GetPlayerName(playerid, pName, sizeof(pName)); format(query, sizeof(query), "SELECT * FROM accounts WHERE name = '%s'", pName); mysql_query(query); mysql_store_result(); if(mysql_num_rows() == 1) { new string[256]; format(string, sizeof(string), "Welcome to MaxZone RPG server.\n\nPlease enter your password to login."); ShowPlayerDialog(playerid, 0, DIALOG_STYLE_PASSWORD, "MaxZone - Login", string, "Login", "Cancel"); } else { new string2[256]; format(string2, sizeof(string2), "Welcome to MaxZone RPG server.\n\nPlease register your password."); ShowPlayerDialog(playerid, 1, DIALOG_STYLE_PASSWORD, "MaxZone - Register", string2, "Register", "Cancel"); } return 1; }
How can i fix this?