SA-MP Forums Archive
Problem with errors [+REP] - 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: Problem with errors [+REP] (/showthread.php?tid=373721)



Problem with errors [+REP] - Ruffian - 31.08.2012

Код:
D:\games\Скинове О.О\Без гангове\gamemodes\gangwars.pwn(6238) : warning 202: number of arguments does not match definition
D:\games\Скинове О.О\Без гангове\gamemodes\gangwars.pwn(8365) : error 029: invalid expression, assumed zero
D:\games\Скинове О.О\Без гангове\gamemodes\gangwars.pwn(8365) : error 017: undefined symbol "cmd_fmute"
D:\games\Скинове О.О\Без гангове\gamemodes\gangwars.pwn(8365) : error 029: invalid expression, assumed zero
D:\games\Скинове О.О\Без гангове\gamemodes\gangwars.pwn(8365) : fatal error 107: too many error messages on one line

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


4 Errors.
6238
Код:
    SaveAccounts(playerid);
8365 - 8390
Код:
CMD:fmute(playerid, params[])
{
	new gamer;
	if(!IsPlayerAdmin(playerid))
    return SendClientMessage(playerid, red, "Access Denied.");
	if (sscanf(params, "u", gamer)) SendClientMessage(playerid, red, "Използвай: \"/mute <Играч>");
	else if (gamer == INVALID_PLAYER_ID) SendClientMessage(playerid, red, "Играча на е намерен");
	else
	{
		SaveInfo[gamer][fMuted] = 1;
	}
	return 1;
}
CMD:funmute(playerid, params[])
{
	new gamer;
	if(!IsPlayerAdmin(playerid))
    return SendClientMessage(playerid, red, "Access Denied.");
	if (sscanf(params, "u", gamer)) SendClientMessage(playerid, red, "Използвай: \"/unmute <Играч>");
	else if (gamer == INVALID_PLAYER_ID) SendClientMessage(playerid, red, "Играча на е намерен");
	else
	{
		SaveInfo[gamer][fMuted] = 0;
	}
	return 1;
}



Re: Problem with errors [+REP] - Dan. - 31.08.2012

Show us the 'SaveAccounts(playerid)' stock or the public function you have.

And where have you put the 'CMD' lines?


Re: Problem with errors [+REP] - RedJohn - 31.08.2012

Quote:

error 017: undefined symbol "cmd_fmute"

That's because you dont have ZCMD included!

Download one and put it into your pawno/includes and then add this to the top of your script:

pawn Код:
#include <zcmd>
Better indentation and some fixes:

pawn Код:
CMD:fmute(playerid, params[])
{
    new gamer;
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, red, "Access Denied.");
    if(sscanf(params, "u", gamer)) return SendClientMessage(playerid, red, "Използвай: \"/mute <Играч>");
    if(gamer == INVALID_PLAYER_ID) return SendClientMessage(playerid, red, "Играча на е намерен");
    SaveInfo[gamer][fMuted] = 1;
    return 1;
}

CMD:funmute(playerid, params[])
{
    new gamer;
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, red, "Access Denied.");
    if(sscanf(params, "u", gamer)) return SendClientMessage(playerid, red, "Използвай: \"/unmute <Играч>");
    if(gamer == INVALID_PLAYER_ID) return SendClientMessage(playerid, red, "Играча на е намерен");
    SaveInfo[gamer][fMuted] = 0;
    return 1;
}
By the way put your ZCMD commands at the bottom of your script. Not under OnPlayerCommandText or something.


Re: Problem with errors [+REP] - Ruffian - 31.08.2012

Quote:
Originally Posted by RedJohn
Посмотреть сообщение
That's because you dont have ZCMD included!

Download one and put it into your pawno/includes and then add this to the top of your script:

pawn Код:
#include <zcmd>
Better indentation and some fixes:

pawn Код:
CMD:fmute(playerid, params[])
{
    new gamer;
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, red, "Access Denied.");
    if(sscanf(params, "u", gamer)) return SendClientMessage(playerid, red, "Използвай: \"/mute <Играч>");
    if(gamer == INVALID_PLAYER_ID) return SendClientMessage(playerid, red, "Играча на е намерен");
    SaveInfo[gamer][fMuted] = 1;
    return 1;
}

CMD:funmute(playerid, params[])
{
    new gamer;
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, red, "Access Denied.");
    if(sscanf(params, "u", gamer)) return SendClientMessage(playerid, red, "Използвай: \"/unmute <Играч>");
    if(gamer == INVALID_PLAYER_ID) return SendClientMessage(playerid, red, "Играча на е намерен");
    SaveInfo[gamer][fMuted] = 0;
    return 1;
}
By the way put your ZCMD commands at the bottom of your script. Not under OnPlayerCommandText or something.
I have zcmd..Not work..

The command in under the public OnPlayerCommandText(playerid, cmdtext[])


Re: Problem with errors [+REP] - Ruffian - 31.08.2012

Help please?


Re: Problem with errors [+REP] - RedJohn - 31.08.2012

Remove it from OnPlayerCommandText. Add it at the bottom.


Re: Problem with errors [+REP] - Ruffian - 31.08.2012

I give you REP,thanks man!


Re: Problem with errors [+REP] - RedJohn - 31.08.2012

No problemo.