10.09.2012, 18:22
Please Help Me Too Solve This Warning And Error +Rep For Helping Me So Please Help Me
This is The Error And Warning
This is Code For The Error And Warning i need this thats why i added this so please help me to solve this
Please Help Me
This is The Error And Warning
pawn Код:
D:\GOD'ZV~1\GAMEMO~1\SATDMW~1\NEWFOL~1\GoDZ.pwn(13681) : error 017: undefined symbol "SendUsage"
D:\GOD'ZV~1\GAMEMO~1\SATDMW~1\NEWFOL~1\GoDZ.pwn(13685) : error 017: undefined symbol "P_DATA"
D:\GOD'ZV~1\GAMEMO~1\SATDMW~1\NEWFOL~1\GoDZ.pwn(13685) : warning 215: expression has no effect
D:\GOD'ZV~1\GAMEMO~1\SATDMW~1\NEWFOL~1\GoDZ.pwn(13685) : error 001: expected token: ";", but found "]"
D:\GOD'ZV~1\GAMEMO~1\SATDMW~1\NEWFOL~1\GoDZ.pwn(13685) : error 029: invalid expression, assumed zero
D:\GOD'ZV~1\GAMEMO~1\SATDMW~1\NEWFOL~1\GoDZ.pwn(13685) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
5 Errors.
pawn Код:
//--------------------------------Player Tele-----------------------------------
CMD:pgoto(playerid, params[])
{
if ( sscanf( params, "s", params[ 0 ]) )
return SendUsage( playerid, "/ptele <on/off>");
if ( strcmp( params[ 0 ], "ON", true) == 0 )
{
if ( P_DATA[ playerid ][ P_Goto ] == 1)
return SendError(playerid, "Goto already turned ON!");
P_DATA[ playerid ][ P_Goto ] = 1;
SendClientMessage(playerid, COLOR_GREEN, "Goto turned ON, players can now come to you!");
}
else if ( strcmp( params[ 0 ], "OFF", true) == 0 )
{
if (P_DATA[ playerid ][ P_Goto ] == 0)
return SendError(playerid, "Goto already turned OFF!");
P_DATA[ playerid ][ P_Goto ] = 0;
SendClientMessage(playerid, COLOR_GREEN, "Goto turned OFF, players cannot come to you anymore");
}
else SendUsage( playerid, "/ptele <on/off>");
return 1;
}
CMD:pgoto(playerid, params[])
{
new string[256];
if ( sscanf( params, "u", params[ 0 ]) )return SendClientMessage(playerid, COLOR_ORANGE, "You can use /ptele<on/off> to disable enable people to come to you"),SendUsage( playerid, "/pgoto <id>" );
if (P_DATA[ params[ 0 ] ][ P_Goto ] == 0 && P_DATA[ playerid ][ P_Level ] < 1 )return format(string,sizeof( string ), "ERROR: %s has the goto turned off.", PlayerName2( params[ 0 ])),SendClientMessage(playerid, COLOR_RED, string );
if( params[ 0 ] == playerid )return SendError( playerid, "You cannot teleport to yourself!");
new Float:ParamX, Float:ParamY, Float:ParamZ;
GetPlayerPos( params[ 0 ], Float:ParamX, Float:ParamY, Float:ParamZ);
SetCameraBehindPlayer( playerid );
SetPlayerInterior( playerid, GetPlayerInterior( params[ 0 ] ));
SetPlayerVirtualWorld( playerid, GetPlayerVirtualWorld( params[ 0 ] ) );
if(GetPlayerState(playerid) == 2){
SetVehiclePos( GetPlayerVehicleID( playerid ), ParamX+2, ParamY, ParamZ );
LinkVehicleToInterior( GetPlayerVehicleID( playerid ), GetPlayerInterior( params[ 0 ] ));
SetVehicleVirtualWorld( GetPlayerVehicleID( playerid ) , GetPlayerVirtualWorld( params[ 0 ] ));
} else {
SetPlayerPos( playerid, ParamX+2, ParamY, ParamZ );
}
FormMessageForAllEx(playerid && params[ 0 ],COLOR_GREEN, "%s teleported to %s!",PlayerName2( playerid ), PlayerName2( params[ 0 ] ));
FormMessage( params[ 0 ], COLOR_GREEN, "%s teleported to you!",PlayerName2( playerid ) );
FormMessage( playerid, COLOR_GREEN, "You teleported to %s!",PlayerName2( params[ 0 ] ) );
return 1;
}