SA-MP Forums Archive
SAMP ERRORS - 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: SAMP ERRORS (/showthread.php?tid=289026)



SAMP ERRORS - DaRkAnGeL[NBK] - 09.10.2011

hey i tryed to use zcmd for my filterscript but i added a command:

pawn Код:
CMD:pm(playerid, params[])
{
    new id, message;
    if(sscanf(params,"us[128]", id, Message))
    {
        new string[128];
        format(string, sizeof(string),"PM From %s[ID: %d]: %s", GetName(id), id, Message);
        SendClientMessage(playerid, -1, string);

        format(string, sizeof(string),"PM To %s[ID: %d]: %s", GetName(playerid), id, Message);
        SendClientMessage(id, -1, string);
    }
    else SendClientMessage(playerid, -1,"Usage: /pm [id][message]");
    return 1;
}
and i get

Код:
C:\Users\Unlimited DMers\Desktop\Fas FreeRoam\gamemodes\saving2.pwn(195) : error 029: invalid expression, assumed zero
C:\Users\Unlimited DMers\Desktop\Fas FreeRoam\gamemodes\saving2.pwn(195) : error 017: undefined symbol "cmd_pm"
C:\Users\Unlimited DMers\Desktop\Fas FreeRoam\gamemodes\saving2.pwn(195) : error 029: invalid expression, assumed zero
C:\Users\Unlimited DMers\Desktop\Fas FreeRoam\gamemodes\saving2.pwn(195) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.



Re: SAMP ERRORS - Josma_cmd - 09.10.2011

You has the zcmd?
pawn Код:
cmd(pm, playerid, params[])
{
    new id, message[100];
    if(sscanf(params,"us[100]", id, message)) return SendClientMessage(playerid, -1,"Usage: /pm [id][message]");
    new string[128];
    format(string, sizeof(string),"PM From %s[ID: %d]: %s", GetName(id), id, message);
    SendClientMessage(playerid, -1, string);
    format(string, sizeof(string),"PM To %s[ID: %d]: %s", GetName(playerid), id, message);
    SendClientMessage(id, -1, string);
    return 1;
}
pawn Код:
new id, message;
//replace to
new id, message[128];

if(sscanf(params,"us[128]", id, Message))
//replace to
if(sscanf(params,"us[128]", id, message))



Re: SAMP ERRORS - DaRkAnGeL[NBK] - 09.10.2011

what the
pawn Код:
#include <zcmd>
??


Re: SAMP ERRORS - Josma_cmd - 09.10.2011

Yes, i edited the post, look the new code.