My friends command problem - 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: My friends command problem (
/showthread.php?tid=395458)
My friends command problem -
Ryox175 - 26.11.2012
Ok all i got this error.
Код:
C:\Documents and Settings\karu\My Documents\samp03e_svr_R2_win32\gamemodes\driftunion1.2.2.pwn(94) : error 001: expected token: ",", but found "-string-"
C:\Documents and Settings\karu\My Documents\samp03e_svr_R2_win32\gamemodes\driftunion1.2.2.pwn(94) : warning 215: expression has no effect
C:\Documents and Settings\karu\My Documents\samp03e_svr_R2_win32\gamemodes\driftunion1.2.2.pwn(94) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\karu\My Documents\samp03e_svr_R2_win32\gamemodes\driftunion1.2.2.pwn(94) : error 029: invalid expression, assumed zero
C:\Documents and Settings\karu\My Documents\samp03e_svr_R2_win32\gamemodes\driftunion1.2.2.pwn(94) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
And pawn code
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/health", cmdtext, true, 10) == 0)
{
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid, 0x33CCFFAA "You have been healed");
return 1;
}
return 0;
}
What is the problem then?
Re: My friends command problem -
Camorra - 26.11.2012
You just missed " , " after " 0x33CCFFAA "
pawn Код:
if(strcmp(cmd,"/health",true) == 0)
{
SetPlayerHealth(playerid,100.0);
SendClientMessage(playerid, 0x33CCFFAA , "You have been healed");
return 1;
}
Re: My friends command problem -
Ryox175 - 26.11.2012
oh thanks, my friend and im little noob at scripting :P kthx for the help