mysql_format(dbHandle,Query, sizeof(Query), "SELECT * FROM `PlayerData` WHERE `Username` = '%e'",Name(playerid));
C:\Users\\Desktop\GTA SA-MP Server\filterscripts\Test.pwn(922) : error 012: invalid function call, not a valid address C:\Users\\Desktop\GTA SA-MP Server\filterscripts\Test.pwn(922) : warning 215: expression has no effect C:\Users\\Desktop\GTA SA-MP Server\filterscripts\Test.pwn(922) : error 001: expected token: ";", but found ")" C:\Users\\Desktop\GTA SA-MP Server\filterscripts\Test.pwn(922) : error 029: invalid expression, assumed zero C:\Users\\Desktop\GTA SA-MP Server\filterscripts\Test.pwn(922) : fatal error 107: too many error messages on one line
public OnPlayerConnect(playerid)
{
SetPlayerMapIcon( playerid, 12, -2462.4688,132.2999,35.1719, 52, 0, MAPICON_LOCAL );
IsAfk[playerid] = 0; // When the player joins, he is not afk , OF COURSE!
new string[64];
new Name[MAX_PLAYER_NAME];
GetPlayerName(playerid,Name,MAX_PLAYER_NAME);
format(string,sizeof string,"[{00FF00}JOIN{EEEEEE}]%s has joined the server.",Name);
SendClientMessageToAll(COLOR_WHITE,string);
SendDeathMessage(-1, playerid, 200);
ResetVars(playerid);
new Query[300], rows, fields, string1[128];
mysql_format(dbHandle,Query, sizeof(Query), "SELECT * FROM `PlayerData` WHERE `Username` = '%e'",Name(playerid));
mysql_query(dbHandle,Query);
cache_get_data(rows, fields);
if(rows)
{
format(string1,sizeof(string1),"{EEEEEE}Welcome back %s\n{EEEEEE}Please login to continue playing",Name(playerid));
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,"Login",string1,"Login","Quit");
}
else if(!rows)
{
format(string1,sizeof(string1),"{EEEEEE}Welcome %s\n{EEEEEE}Please enter a password to register your account",Name(playerid));
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,"Register",string1,"Register","Quit");
}
return 1;
}
C:\Users\\Desktop\GTA SA-MP Server\filterscripts\test.pwn(980) : warning 219: local variable "pName" shadows a variable at a preceding level C:\Users\\Desktop\GTA SA-MP Server\filterscripts\test.pwn(1138) : warning 219: local variable "pName" shadows a variable at a preceding level C:\Users\Desktop\GTA SA-MP Server\filterscripts\test.pwn(1165) : warning 219: local variable "pName" shadows a variable at a preceding level C:\Users\\Desktop\GTA SA-MP Server\filterscripts\test.pwn(1303) : warning 217: loose indentation C:\Users\\Desktop\GTA SA-MP Server\filterscripts\test.pwn(1551) : warning 219: local variable "pName" shadows a variable at a preceding level C:\Users\\Desktop\GTA SA-MP Server\filterscripts\test.pwn(1568) : warning 219: local variable "pName" shadows a variable at a preceding level C:\Users\\Desktop\GTA SA-MP Server\filterscripts\test.pwn(1704) : warning 219: local variable "pName" shadows a variable at a preceding level C:\Users\\Desktop\GTA SA-MP Server\filterscripts\test/pwn(1765) : warning 219: local variable "pName" shadows a variable at a preceding level C:\Users\\Desktop\GTA SA-MP Server\filterscripts\test/.pwn(1817) : warning 219: local variable "pName" shadows a variable at a preceding level C:\Users\\Desktop\GTA SA-MP Server\filterscripts\test..pwn(1842) : warning 219: local variable "pName" shadows a variable at a preceding level C:\Users\\Desktop\GTA SA-MP Server\filterscripts\test..pwn(1900) : warning 219: local variable "pName" shadows a variable at a preceding level Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 11 Warnings.
"pName" is declared as global and you declare it as local too, that's why it gives you the warning. Use pName directly without declaring it or declare a variable with other name.
|
#include <myAdmin>