*** ERROR: redefinition of constant/macro ** - 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: *** ERROR: redefinition of constant/macro ** (
/showthread.php?tid=375595)
*** ERROR: redefinition of constant/macro ** -
xSkullx - 07.09.2012
Error:
pawn Код:
warning 201: redefinition of constant/macro (symbol "Public:%0(%1)")
Line:
Entire Script:
pawn Код:
#define Public:%0(%1)\
forward %0(%1);\
public %0(%1)
Re: *** ERROR: redefinition of constant/macro ** -
Michael@Belgium - 07.09.2012
Quote:
Originally Posted by xSkullx
|
Huh ? You should have something like this:
Re: *** ERROR: redefinition of constant/macro ** -
xSkullx - 07.09.2012
Yes i have :
pawn Код:
Public: SendVipMessage( color, const string[ ] )
{
foreach(Player, i )
if ( P_DATA[ i ][ Vip ] >= 1 )
SendClientMessage( i, color, string );
return 1;
}
Public: ReturnPosition( playerid )
{
SetPlayerPos( playerid, Position[ playerid ][ 0 ], Position[ playerid ][ 1 ], Position[ playerid ][ 2 ] );
SetPlayerFacingAngle( playerid, Position[ playerid ][ 3 ] );
}
Public: GodUpdate( )
{
foreach(Player, i )
{
if ( P_DATA[ i ][ God ] == 1 )
SetPlayerHealth( i, 100000 );
if ( P_DATA[ i ][ CarGod ] == 1 && IsPlayerInAnyVehicle( i ) )
SetVehicleHealth( GetPlayerVehicleID( i ), 10000 );
}
}
Re: *** ERROR: redefinition of constant/macro ** -
IstuntmanI - 07.09.2012
You already have "Public:" defined.
Re: *** ERROR: redefinition of constant/macro ** -
MarkoN - 07.09.2012
isnt it easier to forward and then use the normal public
pawn Код:
forward SendVipMessage(color, const string[ ]);
public SendVipMessage(color, const string[ ])
{
foreach(Player, i )
if ( P_DATA[ i ][ Vip ] >= 1 )
SendClientMessage( i, color, string );
return 1;
}