E:\GTA San Andreas\Server\filterscripts\PM.pwn(37) : error 020: invalid symbol name "" E:\GTA San Andreas\Server\filterscripts\PM.pwn(3 : error 020: invalid symbol name "" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors. |
#include <a_samp>
#include <zcmd>
#include <sscanf2>
#define FILTERSCRIPT
#if defined FILTERSCRIPT
#define Yellow 0xFFFF00AA
#define Red 0xFF0000AA
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#endif
CMD:pm(playerid, params[])
{
new str[256], str2[256], id, idx, player;
if(sscanf(params, "us", id, str2))
{
SendClientMessage(playerid, Yellow, "Usage: /pm <playerid> <message>");
return 1;
}
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, Red, "ERROR: Player not connected");
if(playerid == id) return SendClientMessage(playerid, Red, "ERROR: You cannot pm yourself!");
{
GetPlayerName(playerid, player, sizeof(playerid));
GetPlayerName(id, idx, sizeof(idx));
format(str, sizeof(str), "PM sent to %s(ID: %d): %s", id, str2);
SendClientMessage(playerid, 0xFF0000FF, str);
format(str, sizeof(str), "PM from %s(ID: %d): %s", playerid, str2);
SendClientMessage(id, Yellow, str);
}
return 1;
}
E:\GTA San Andreas\Server\filterscripts\PM.pwn(37) : error 035: argument type mismatch (argument 2) E:\GTA San Andreas\Server\filterscripts\PM.pwn(37) : error 035: argument type mismatch (argument 2) E:\GTA San Andreas\Server\filterscripts\PM.pwn(3 : error 035: argument type mismatch (argument 2) E:\GTA San Andreas\Server\filterscripts\PM.pwn(3 : error 035: argument type mismatch (argument 2) E:\GTA San Andreas\Server\filterscripts\PM.pwn(2 : warning 203: symbol is never used: "player" E:\GTA San Andreas\Server\filterscripts\PM.pwn(2 : warning 203: symbol is never used: "idx" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors. |
CMD:pm(playerid, params[])
{
new str[128], str2[128], id;
if(sscanf(params, "us", id, str2)) return SendClientMessage(playerid, Yellow, "Usage: /pm <playerid> <message>");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, Red, "ERROR: Player not connected");
if(playerid == id) return SendClientMessage(playerid, Red, "ERROR: You cannot pm yourself!");
new iName[24], pName[24];
GetPlayerName(id,iName,sizeof(iName));
GetPlayerName(playerid,pName,sizeof(pName));
format(str, sizeof(str), "PM sent to %s(ID: %d): %s", iName, id, str2);
SendClientMessage(playerid, 0xFF0000FF, str);
format(str, sizeof(str), "PM from %s(ID: %d): %s", pName, playerid, str2);
SendClientMessage(id, Yellow, str);
return 1;
}
Mademan, it compiled with no problem, but it didnt work ingame :S Why ??
|