[Spy Message]
#1

Hello,I created a command Spy Message which sends to other player without giving name of player so when i try to compile it it says Fatal Error Cant Read From SSCANF
I edited it and it fixed its problem is Print thing and deleted it but new errors
Code:
Code:
// Spy Message Giver V1.0-Tony Ronaldo //
// Command SM Or spymessage [id] to use it //
// Good For FBI And Hitman //

#include <a_samp>
#include <sscanf2>
1
#if defined FILTERSCRIPT

public OnFilterScriptInit()
{

}

public OnFilterScriptExit()
{
	return 1;
}

CMD:sm(playerid, params[])
{
	new
		id;
	if (sscanf(params, "u", id)) SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/Spymessage <playerid>\"");
	else if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "Player Not Found");dC
	SendClientMessage (id, 0xB8860BAA, "");
	SendClientMessage (playerid, 0xB8860BAA, "Spy Message Sent.If You Have Found This Command Leave It Or Else You Will Be Banned For Using And Abusing FBI And Hitman Commands.");
	SendClientMessage (id, 0xAA3333AA,"A Spy Has Sent You A Message.It Seems To Be Your In Danger!" );
	SendClientMessage (playerid, 0xAA3333AA, "You Have To Rp Spy Message!!!.If You Do Not You Will Get 30 Minutes Jail.");

	else
	{

#else

main()
{

#endif
Code:
Error:
D:\SA-MP Server  For Testing\filterscripts\SpyMessage.pwn(7) : error 010: invalid function or declaration
D:\SA-MP Server  For Testing\filterscripts\SpyMessage.pwn(40) : error 030: compound statement not closed at the end of file (started at line 40)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply
#2

close line at line 40
Reply
#3

1- You didn't include zcmd
2- You have "1" under your includes
3- You didn't close the open curly bracket under else
4- You also didn't close the open curly bracket under main()

EDIT: 5- SendClientMessage(playerid, 0xFF0000AA, "Player Not Found");dC remove that "dC"
Reply
#4

Quote:
Originally Posted by Stinged
View Post
1- You didn't include zcmd
2- You have "1" under your includes
3- You didn't close the open curly bracket under else
4- You also didn't close the open curly bracket under main()

EDIT: 5- SendClientMessage(playerid, 0xFF0000AA, "Player Not Found");dC remove that "dC"
Code:
// Spy Message Giver V1.0-Tony Ronaldo //
// Command SM Or spymessage [id] to use it //
// Good For FBI And Hitman //

#include <a_samp>
#include <sscanf2>
#include <zcmd>
#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
     	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

CMD:sm(playerid, params[])
{
	new
		id;
	if (sscanf(params, "u", id)) SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/Spymessage <playerid>\"");
	else if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "Player Not Found");
	SendClientMessage (id, 0xB8860BAA, "");
	SendClientMessage (playerid, 0xB8860BAA, "Spy Message Sent.If You Have Found This Command Leave It Or Else You Will Be Banned For Using And Abusing FBI And Hitman Commands.");
	SendClientMessage (id, 0xAA3333AA,"A Spy Has Sent You A Message.It Seems To Be Your In Danger!" );
	SendClientMessage (playerid, 0xAA3333AA, "You Have To Rp Spy Message!!!.If You Do Not You Will Get 30 Minutes Jail.");

	else
	{
          //This bit needs to be finished.
        }

}
#else

main() { }

#endif
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)