Need help with one /pm command - 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: Need help with one /pm command (
/showthread.php?tid=396169)
Need help with one /pm command -
Smokkr - 29.11.2012
https://sampwiki.blast.hk/wiki/OnPlayerPrivmsg - I get the command from here, and when I compile the script show me this:
How to fix these errors?
Re: Need help with one /pm command -
N0FeaR - 29.11.2012
give line 90,91,93.94,96
Re: Need help with one /pm command -
Smokkr - 29.11.2012
Line 90
pawn Код:
tmp = strtok(cmdtext,idx);
Line 91
pawn Код:
if(!strlen(tmp)) return SendClientMessage(playerid,0xFF0000FF,"USAGE: /PM (id) (message)");
Line 93
pawn Код:
gMessage = strrest(cmdtext,idx);
Line 94
pawn Код:
if(!strlen(gMessage)) return SendClientMessage(playerid,0xFF0000FF,"Usage: /pm (id) (message)");
Line 96
pawn Код:
GetPlayerName(id,iName,sizeof(iName));
Re: Need help with one /pm command -
NumbSkull - 29.11.2012
did you define strtok and the other things as stocks or vars and w/e in the script?
Re: Need help with one /pm command -
iTzZh - 29.11.2012
I don't even need to see the lines to tell you, you didn't define those variables.
Re: Need help with one /pm command -
tyler12 - 29.11.2012
pawn Код:
strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}
new offset = index;
new result[20];
while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}
and new tmp[124];
Re: Need help with one /pm command -
Smokkr - 29.11.2012
I already resolve it with doreto's help on skype. Thanks anyway!