public OnPlayerLeaveCheckpoint(playerid)
{
SendClientMessage(playerid,-1,"You have left a checkpoint.");
print("Someone left a checkpoint");
return 1;
}
public OnPlayerLeaveCheckpoint(playerid)
{
SendClientMessage(playerid,-1,"You have left a checkpoint.");
print("Someone left a checkpoint");
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(vehicleid == 520) // Just a random ID, unsure if it really exists
{
SendClientMessage(playerid,-1,"You have entered vehicle ID 520.");
return 1;
}
else return 0;
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(vehicleid == 520) // Just a random ID, unsure if it really exists
{
SendClientMessage(playerid,-1,"You have entered vehicle ID 520.");
return 1
}
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
/* if(vehicleid == 520)
{
if(playerid == 0)
{
/* if(ispassenger)
{
print("Ohai!");
return 1;
}
}
} */
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
/* if(vehicleid == 520)
{
if(playerid == 0)
{
if(ispassenger)
{
print("Ohai!");
return 1;
}
}
} */
return 1;
}
CMD:centermap(playerid,params[])
{
#pragma unused params
SetPlayerPos(playerid,0.0,0.0,3.0,90.0); // We've put the angle here too 'by accident'
SendClientMessage(playerid,-1,"You have been sent to the center of the map in Blue Berry.");
return 1;
}
CMD:centermap(playerid,params[])
{
#pragma unused params
SetPlayerPos(playerid,0.0,0.0,3.0);
SetPlayerFacingAngle(playerid,90.0); // Correct is to put the angle into this function.
SendClientMessage(playerid,-1,"You have been sent to the center of the map in Blue Berry.");
return 1;
}
CMD:skydive(playerid,params[])
{
#pragma unused params
new Float:Pos[3],string[128];
GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
SetPlayerPos(playerid,Pos[0],Pos[1],Pos[2] + 200);
SendClientMessage(playerid,-1,"You have been sent high in the sky.");
GivePlayerWeapon(playerid,46,1);
return 1;
}
CMD:skydive(playerid,params[])
{
#pragma unused params
new Float:Pos[3];
GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
SetPlayerPos(playerid,Pos[0],Pos[1],Pos[2] + 200);
SendClientMessage(playerid,-1,"You have been sent high in the sky.");
GivePlayerWeapon(playerid,46,1);
return 1;
}
CMD:mypos(playerid,params[])
{
#pragma unused params
new Pos[3]; // As you see the Pos array doesn't have the 'Float' label
GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
printf("Your position: X: %f || Y: %f || Z: %f",Pos[0],Pos[1],Pos[2]);
return 1;
}
CMD:mypos(playerid,params[])
{
#pragma unused params
new Float:Pos[3]; // Now it has the label, it is all right.
GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
printf("Your position: X: %f || Y: %f || Z: %f",Pos[0],Pos[1],Pos[2]);
return 1;
}
#define PutPos(%1,%2,%3,%4); SetPlayerPos(%9,%2,%3,%4); // %9 is not defined here.
#define PutPos(%1,%2,%3,%4); SetPlayerPos(%1,%2,%3,%4);
CMD:myname(playerid,params[])
{
#pragma unused params
GetPlayerName(playerid,Playername,sizeof(Playername));
SendClientMessage(playerid,-1,Playername);
return 1;
}
CMD:myname(playerid,params[])
{
#pragma unused params
new Playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,Playername,sizeof(Playername));
SendClientMessage(playerid,-1,Playername);
return 1;
}
CMD:myname(playerid,params[])
{
new Playername[MAX_PLAYER_NAME];
#pragma unused params
new Playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,Playername,sizeof(Playername));
SendClientMessage(playerid,-1,Playername);
return 1;
}
CMD:myname(playerid,params[])
{
#pragma unused params
new Playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,Playername,sizeof(Playername));
SendClientMessage(playerid,-1,Playername);
return 1;
}
CMD:parachute(playerid,params[])
{
#pragma unused params
GivePlayerWeapon(playerid,46,1);k
SendClientMessage(playerid,-1,"You got a parachute");
return 1;
}
CMD:parachute(playerid,params[])
{
#pragma unused params
GivePlayerWeapon(playerid,46,1);
SendClientMessage(playerid,-1,"You got a parachute");
return 1;
}
CMD:parachute(playerid,params[])
{
#pragma unused params
GivePlayerWeapon(playerid,46,1);; // This will give empty statement
SendClientMessage(playerid,-1,"You got a parachute");
return 1;
}
CMD:parachute(playerid,params[])
{
#pragma unused params
GivePlayerWeapon(playerid,46,1); // This will give no errors.
SendClientMessage(playerid,-1,"You got a parachute");
return 1;
}
CMD:stats(playerid,params[])
{
SendFormatMessage(playerid,-1,"Cash: %d ... Score: %d",GetPlayerMoney(playerid),GetPlayerScore(playerid)); // We haven't added the stock in the function
return 1;
}
new str[128];
#define SendFormatMessage(%0,%1,%2,%3) format(str, sizeof(str),%2,%3) && SendClientMessage(%0, %1, str)
Originally Posted by Unsure Error List
|
error 036: empty statement
SetPlayerInterior(playerid, 3);; // Notice extra semi-colon.
error 028: invalid subscript (not an array or too many subscripts): "player1"
|
- Unreachable code
Code:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { if(vehicleid == 520) // Just a random ID, unsure if it really exists { SendClientMessage(playerid,-1,"You have entered vehicle ID 520."); return 1 } else return 0; return 1; }
Code:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { if(vehicleid == 520) // Just a random ID, unsure if it really exists { SendClientMessage(playerid,-1,"You have entered vehicle ID 520."); return 1 } return 1; } |
- Unreachable code
Code:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { if(vehicleid == 520) // Just a random ID, unsure if it really exists { SendClientMessage(playerid,-1,"You have entered vehicle ID 520."); return 1; } else return 0; return 1; }
Code:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { if(vehicleid == 520) // Just a random ID, unsure if it really exists { SendClientMessage(playerid,-1,"You have entered vehicle ID 520."); return 1; } return 1; } |
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { if ( vehicleid == 520 ) // Just a random ID, unsure if it really exists { SendClientMessage( playerid, -1, "You have entered vehicle ID 520." ); return 1; } else if ( vehicleid != 520 ) return 0; return 1; }
SendClientMessage(playerid, "Hi", COLOR_WHITE);
SendClientMessage(playerid, COLOR_WHITE, "Hi);