Error - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Error (
/showthread.php?tid=135058)
Error -
bartje01 - 18.03.2010
Hey guys. I knew from the start that this doesn't works. I was trying something like this for the first time tho'
It is that there must go a sendclientmessagetoall with this:
'Playername' has given respect to 'targetname'
my script
Код:
dcmd_respect(playerid, params[]) {
new PName[24];
GetPlayerName(playerid, PName, 24);
new target;
target = strval(params);
new TargetName[24];
if(!params[0]) return SendClientMessage(playerid, 0x2641FEAA, "ERROR: /respect <playerid>");
SendClientMessageToAll(,red,PName,"has given respect to",TargetName);
PlayerInfo[target][Respects]++;
return 1;
}
Errors:
Код:
C:\Users\Bart\Desktop\samp server\filterscripts\ladmin4v2.pwn(4428) : error 029: invalid expression, assumed zero
C:\Users\Bart\Desktop\samp server\filterscripts\ladmin4v2.pwn(4428) : warning 215: expression has no effect
C:\Users\Bart\Desktop\samp server\filterscripts\ladmin4v2.pwn(4428) : warning 215: expression has no effect
C:\Users\Bart\Desktop\samp server\filterscripts\ladmin4v2.pwn(4428) : warning 215: expression has no effect
C:\Users\Bart\Desktop\samp server\filterscripts\ladmin4v2.pwn(4428) : warning 215: expression has no effect
C:\Users\Bart\Desktop\samp server\filterscripts\ladmin4v2.pwn(4428) : error 001: expected token: ";", but found ")"
C:\Users\Bart\Desktop\samp server\filterscripts\ladmin4v2.pwn(4428) : error 029: invalid expression, assumed zero
C:\Users\Bart\Desktop\samp server\filterscripts\ladmin4v2.pwn(4428) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Error line 4428:
Код:
SendClientMessageToAll(,red,PName,"has given respect to",TargetName);
Please help
Re: Error -
aircombat - 18.03.2010
here is the right code :
Код:
dcmd_respect(playerid, params[]) {
new PName[24];
GetPlayerName(playerid, PName, 24);
new target, string9[128];
target = strval(params);
new TargetName[24];
if(!params[0]) return SendClientMessage(playerid, 0x2641FEAA, "ERROR: /respect <playerid>");
format(string9,sizeof(string9),"%s has given respect to %s",PName,TargetName);
SendClientMessageToAll(red,string9);
PlayerInfo[target][Respects]++;
return 1;
}