3 warnings with sscanf rep +
#1

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):
Reply
#2

Код:
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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)