3 warnings with sscanf rep + - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: 3 warnings with sscanf rep + (
/showthread.php?tid=453777)
3 warnings with sscanf rep + -
CTAntonio - 26.07.2013
This is code:
Код:
COMMAND:email(playerid, params[])
{
SendAdminText(playerid, "/email", params);
new Email[128];
// Check if the player has logged in
if (APlayerData[playerid][LoggedIn] == true)
{
if(sscanf(params, "s[128]", Email)) return SendClientMessage(playerid, 0xFF0000FF, "{FF0000}Komanda:{FF0000} {FFFFFF}/Email <primjer@mail.com>{FFFFFF}");
format(APlayerData[playerid][PlayerPassword], 128, "%s", Email);
PlayerFile_Save(playerid);
}
else
return 0;
return 1;
}
This are warnings:
Код:
(6172) : warning 219: local variable "Email" shadows a variable at a preceding level
(6176) : warning 213: tag mismatch
(6177) : warning 213: tag mismatch
(6172) : warning 204: symbol is assigned a value that is never used: "Email"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Warnings.
pic(with lines):
Re: 3 warnings with sscanf rep + -
dEcooR - 26.07.2013
Код:
COMMAND:email(playerid, params[])
{
SendAdminText(playerid, "/email", params);
new emaail[128];
// Check if the player has logged in
if (APlayerData[playerid][LoggedIn] == true)
{
if(sscanf(params, "s", emaail)) return SendClientMessage(playerid, 0xFF0000FF, "{FF0000}Komanda:{FF0000} {FFFFFF}/email <primjer@mail.com>{FFFFFF}");
format(APlayerData[playerid][PlayerPassword], 128, "%s", emaail);
PlayerFile_Save(playerid);
}
else return 0;
return 1;
}