public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case DIALOG_REGISTER:
{
if(!response) return Kick(playerid);
if(strlen(inputtext) < 3 && strlen(inputtext) > 20)
{
new Name[MAX_PLAYER_NAME],string[256],escaped[128];
GetPlayerName(playerid,Name,sizeof(Name));
mysql_escape_string(inputtext,escaped);
format(string,sizeof(string),"INSERT INTO `users` (`username`, `password`) VALUES ('%s', ('%s'))",Name,escaped);
mysql_query(string); // line 297 <<<<<<<<<<<<<<
}
else
{
SendClientMessage(playerid,COLOR_WHITE,"Your password is too short or too long!");
}
}
case DIALOG_LOGIN:
{
if(!response) return Kick(playerid);
new string[256],password[128],Name[MAX_PLAYER_NAME];
GetPlayerName(playerid,Name,sizeof(Name));
format(string,sizeof(string),"SELECT `password` FROM `users` WHERE `username` = '%s'",Name);
mysql_query(string); // line 310 <<<<<<<<<<<<<<
cache_get_query_string(password);
if(strcmp(inputtext,password))
{
new text[128];
format(text,sizeof(text),"Welcome back %s! You are now logged in",Name);
SendClientMessage(playerid,COLOR_YELLOW,Name);
printf("%s has logged in.",Name);
LoggedIn[playerid] = 1;
}
}
}
return 1;
}
stock CheckAccount(account[])
{
new string[256];
format(string, sizeof(string), "SELECT * FROM Users WHERE Name = '%s'", account);
mysql_query(string); // line 342 <<<<<<<<<<<<<<
new row;
cache_get_query_string(row); // line 344 <<<<<<<<<<<<<<
if(row > 0)
{
return 1;
}
else
{
return 0;
}
}
mysql_query(string); // line 297 mysql_query(string); // line 310 mysql_query(string); // line 342 cache_get_query_string(row); // line 344
|
highlight the lines, or just show me the 4 lines with the errors below the whole code, as I CBF to check the syntax you've used for every function.
|
|
Well there is no tag mismatch there... A tag mismatch is where you put the wrong data type for a function.
Example: function(integer, string); and the function asks for function(string, string); The only thing I can think of it being is, a problem with the function MySQL_Query. Have you edited it? Which to be honest I doubt you have. |