SA-MP Forums Archive
What's wrong with this? - 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: What's wrong with this? (/showthread.php?tid=334206)



What's wrong with this? - sampmark05 - 14.04.2012

When i compiled my work this error shows

C:\Documents and Settings\JUN.DELL\My Documents\Downloads\Games Installer\Next Revolution Roleplay\Next Revolution Roleplay\gamemodes\NRRP.pwn(870 : error 021: symbol already defined: "SendClientMessage"
C:\Documents and Settings\JUN.DELL\My Documents\Downloads\Games Installer\Next Revolution Roleplay\Next Revolution Roleplay\gamemodes\NRRP.pwn(8710) : error 010: invalid function or declaration
C:\Documents and Settings\JUN.DELL\My Documents\Downloads\Games Installer\Next Revolution Roleplay\Next Revolution Roleplay\gamemodes\NRRP.pwn(8711) : error 010: invalid function or declaration
C:\Documents and Settings\JUN.DELL\My Documents\Downloads\Games Installer\Next Revolution Roleplay\Next Revolution Roleplay\gamemodes\NRRP.pwn(8713) : error 010: invalid function or declaration
C:\Documents and Settings\JUN.DELL\My Documents\Downloads\Games Installer\Next Revolution Roleplay\Next Revolution Roleplay\gamemodes\NRRP.pwn(8714) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


5 Errors.


This is the line with errors

Код:
SendClientMessage(playerid, color, string[])
{
	if(InsideMainMenu[playerid] == 1 || InsideTut[playerid] == 1 || ActiveChatbox[playerid] == 0)
		return 0;

	else SendClientMessage(playerid, color, string);
	return 1;
}
Код:
[8708] SendClientMessage(playerid, color, string[])
Код:
[8710] if(InsideMainMenu[playerid] == 1 || InsideTut[playerid] == 1 || ActiveChatbox[playerid] == 0)
Код:
[8711] return 0;
Код:
[8713] else SendClientMessage(playerid, color, string);
Код:
[8714] return 1;



Re: What's wrong with this? - Cjgogo - 14.04.2012

What the hell,beer or wine,why did you try to re-define the function,it's a default function,where did you get this from it doesn't make sense at all:
pawn Код:
SendClientMessage(playerid, color, string[])
{
    if(InsideMainMenu[playerid] == 1 || InsideTut[playerid] == 1 || ActiveChatbox[playerid] == 0)
        return 0;

    else SendClientMessage(playerid, color, string);
    return 1;
}



Re: What's wrong with this? - Kaczmi - 14.04.2012

pawn Код:
SendClientMessageEx(playerid, color, string[])
{
    if(InsideMainMenu[playerid] == 1 || InsideTut[playerid] == 1 || ActiveChatbox[playerid] == 0)
        return 0;

    else SendClientMessage(playerid, color, string);
    return 1;
}
pawn Код:
#define SendClientMessage SendClientMessageEx
Don't create exist's functions!!


Re: What's wrong with this? - sampmark05 - 14.04.2012

tHANKS I WILL GIVE YOU TWO REP


Re: What's wrong with this? - sampmark05 - 14.04.2012

Quote:
Originally Posted by Cjgogo
Посмотреть сообщение
What the hell,beer or wine,why did you try to re-define the function,it's a default function,where did you get this from it doesn't make sense at all:
pawn Код:
SendClientMessage(playerid, color, string[])
{
    if(InsideMainMenu[playerid] == 1 || InsideTut[playerid] == 1 || ActiveChatbox[playerid] == 0)
        return 0;

    else SendClientMessage(playerid, color, string);
    return 1;
}
Becaues i changes all SendClientMessageEx to SendClientMessage