01.07.2013, 18:13
I just scripted a /pm system but I get a weird error...Here is the error:
And here is the code:
Код:
SAMP\gamemodes\HGRP.pwn(39699) : error 017: undefined symbol "string" SAMP\gamemodes\HGRP.pwn(39699) : error 017: undefined symbol "string" SAMP\gamemodes\HGRP.pwn(39699) : error 029: invalid expression, assumed zero SAMP\gamemodes\HGRP.pwn(39699) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
pawn Код:
CMD:pm(playerid, params[])
{
new id, msg[81];
if(sscanf(params, "us[81]", id, msg)) return SendClientMessageEx(playerid, COLOR_GRAD3, "{FF0000}Usage: {FFFFFF}/pm [playerid] [text]");
if(msg[80]) return SendClientMessageEx(playerid, COLOR_GRAD3, "{FF0000}Error! {FFFFFF}Invalid PM Lenght. Your PM Must Be Between 1-80 Characters.");
if(isnull(msg)) return SendClientMessageEx(playerid, COLOR_GRAD3, "{FF0000}Error! {FFFFFF}Invalid PM Lenght. Your PM Must Be Between 1-80 Characters.");
if(!IsPlayerConnected(id)) return SendClientMessageEx(playerid, COLOR_GRAD3, "Invalid Player!");
// if(HidePM[id] > 0) SendClientMessageEx(playerid, COLOR_YELLOW, "{FF0000}%s {009900}(%d) {FFFFFF}Is {FF0000}Not {FFFFFF}Accepting His PMs At The Moment.", GetPlayerNameEx(id), id);
else
{
format(string, sizeof(string), "%s(ID: %d) PMs:(( %s ))", GetPlayerNameEx(playerid), playerid, msg); // ERROR LINE
SendClientMessageEx(id, COLOR_ORANGE, string);
format(string, sizeof(string), "PM sent to %s(ID: %d):(( %s ))", GetPlayerNameEx(id), id, msg);
SendClientMessageEx(playerid, COLOR_ORANGE, string);
//SendClientMessage(id, COLOUR_INFO, "{FFFFFF}Use {33CCCC}/reply (/r) {FFFFFF}To Quick Reply And {33CCCC}/nopm {FFFFFF}To {FF0000}Disable {FFFFFF}PMs.");
SetPVarInt(id, "LastMessage", playerid);
#if defined LOG_PM
LogPM(playerid, id, params);
#endif
}
return 1;
}