SA-MP Forums Archive
Error : Log , +rep for help! - 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: Error : Log , +rep for help! (/showthread.php?tid=538439)



Error : Log , +rep for help! - MrCallum - 21.09.2014

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;
}



Re: Error : Log , +rep for help! - Rudy_ - 21.09.2014

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


Re: Error : Log , +rep for help! - MrCallum - 21.09.2014

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


Re : Error : Log , +rep for help! - Anonyme - 21.09.2014

....


Re: Error : Log , +rep for help! - MrCallum - 21.09.2014

Thank you Ralfie, It works perfectly!