SA-MP Forums Archive
slap command not working - 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: slap command not working (/showthread.php?tid=460638)



slap command not working - Strapz - 29.08.2013

Код:
//slap cmd

CMD:slap(playerid, params[])
{

	new slapwarning[200];
	new player1;
	new playertarget;
	new object[30];
	if(sscanf(params,"us", playertarget, object))return SendClientMessage(playerid, 0x00CC99,"USAGE:/slap [id] [object]);
	format(slapwarning, sizeof(slapwarning),"%s slapped %s alittle with a bit of a %s", player1, playertarget, object);
	SendClientMessageToAll(playerid, 0x9933FF,slapwarning);
    return 1;
	
}
Код:
C:\Documents and Settings\Administrador\Ambiente de trabalho\samp03x_svr_R1-2_win32\pawno\strapz.pwn(569) : error 037: invalid string (possibly non-terminated string)
C:\Documents and Settings\Administrador\Ambiente de trabalho\samp03x_svr_R1-2_win32\pawno\strapz.pwn(569) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrador\Ambiente de trabalho\samp03x_svr_R1-2_win32\pawno\strapz.pwn(569) : error 017: undefined symbol "slap"
C:\Documents and Settings\Administrador\Ambiente de trabalho\samp03x_svr_R1-2_win32\pawno\strapz.pwn(569) : fatal error 107: too many error messages on one line

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


4 Errors.

Anybody knows whats wrong btw if possible can you guys tell me how to put the slap sound in a way that everybody can hear it?


Re: slap command not working - Konstantinos - 29.08.2013

pawn Код:
if(sscanf(params,"us[30]", playertarget, object))return SendClientMessage(playerid, 0x00CC99,"USAGE:/slap [id] [object]");
// specifier "s" needs the size too. It becomes: "s[size_here]".
// It was: "USAGE:/slap [id] [object]); - There was a missing " at the end to end the string.



Re: slap command not working - Strapz - 29.08.2013

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
pawn Код:
if(sscanf(params,"us[30]", playertarget, object))return SendClientMessage(playerid, 0x00CC99,"USAGE:/slap [id] [object]");
// specifier "s" needs the size too. It becomes: "s[size_here]".
// It was: "USAGE:/slap [id] [object]); - There was a missing " at the end to end the string.
Thank you you are very helpful reped