Error : Log , +rep for help!
#1

Apparently I have an error "Log":

Quote:

C:\Users\Callum.Acer\Desktop\Scripting extra\gamemodes\Millenium.pwn(186 : error 017: undefined symbol "Log"
C:\Users\Callum.Acer\Desktop\Scripting extra\gamemodes\Millenium.pwn(1879) : error 017: undefined symbol "Log"

Command:

Код:
CMD:setcsr(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] <= 5) return Error(playerid, "You are not authorized to use this command.");
	new giveplayerid, string[128];
	if(sscanf(params, "i", giveplayerid)) return Syntax(playerid, "setcsr", "[playerid]");
	if(!IsPlayerConnected(giveplayerid)) return Error(playerid, "That player is not online!");
	if(PlayerInfo[giveplayerid][pShopTech] == 0)
	{
		PlayerInfo[giveplayerid][pShopTech] = 1;
		format(STRING, "You have made %s a CSR!",GetPlayerNameEx(giveplayerid));
		SendClientMessageEx(playerid, COLOR_WHITE, string);
		format(STRING, "AdmCmd: %s has made %s a CSR!",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
		SendAdminMessage(COLOR_LIGHTRED, string);
		Log("logs/csr.log", string); // LINE 1868
		format(STRING, "Admin %s has made you a CSR",GetPlayerNameEx(playerid));
		SendClientMessageEx(giveplayerid, COLOR_WHITE, string);
	}
	else if(PlayerInfo[giveplayerid][pShopTech] == 1)
	{
		PlayerInfo[giveplayerid][pShopTech] = 0;
		format(STRING, "You have taken away %s's CSR!",GetPlayerNameEx(giveplayerid));
		SendClientMessageEx(playerid, COLOR_WHITE, string);
		format(STRING, "AdmCmd: %s has removed %s from the CSR team!",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
		SendAdminMessage(COLOR_LIGHTRED, string);
		Log("logs/csr.log", string); // LINE 1879
		format(STRING, "Admin %s has taken away your CSR",GetPlayerNameEx(playerid));
		SendClientMessageEx(giveplayerid, COLOR_WHITE, string);
	}
	OnPlayerStatsUpdate(giveplayerid);
	return 1;
}
Reply
#2

pawn Код:
new Log;
Edit: wait, where you copied this from? -.-
Reply
#3

I have not copied it from anywhere,
Also i tried new log; it does not work.
Reply
#4

....
Reply
#5

Thank you Ralfie, It works perfectly!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)