03.03.2011, 16:48
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/nrg1", cmdtext, true, 10) == 0)
{
{
if(IsPlayerInAnyVehicle(playerid))
{
SetVehiclePos(GetPlayerVehicleID(playerid), 2857.31,-1960.78,10.9376);
SetVehicleZAngle(GetPlayerVehicleID(playerid), 0.0);
LinkVehicleToInterior(GetPlayerVehicleID(playerid) , 0);
}
else
{
SetPlayerPos(playerid, 2857.31,-1960.78,10.9376);
SetPlayerFacingAngle(playerid, 0.0);
}
SetPlayerInterior(playerid, 0);
SendClientMessage(playerid, COLOR_LIGHTBLUE, " Welcome to Nrg1!");
return 1;
}
return 0;
}
}
and theese are the warnings
C:\Documents and Settings\maya\Desktop\Games\samp03csvr_win32\pawno \Untitled.pwn(95) : warning 225: unreachable code
C:\Documents and Settings\maya\Desktop\Games\samp03csvr_win32\pawno \Untitled.pwn(95) : warning 217: loose indentation
C:\Documents and Settings\maya\Desktop\Games\samp03csvr_win32\pawno \Untitled.pwn(97) : warning 209: function "OnPlayerCommandText" should return a value
line 95 is return 0;
line 97 is the last }
{
if (strcmp("/nrg1", cmdtext, true, 10) == 0)
{
{
if(IsPlayerInAnyVehicle(playerid))
{
SetVehiclePos(GetPlayerVehicleID(playerid), 2857.31,-1960.78,10.9376);
SetVehicleZAngle(GetPlayerVehicleID(playerid), 0.0);
LinkVehicleToInterior(GetPlayerVehicleID(playerid) , 0);
}
else
{
SetPlayerPos(playerid, 2857.31,-1960.78,10.9376);
SetPlayerFacingAngle(playerid, 0.0);
}
SetPlayerInterior(playerid, 0);
SendClientMessage(playerid, COLOR_LIGHTBLUE, " Welcome to Nrg1!");
return 1;
}
return 0;
}
}
and theese are the warnings
C:\Documents and Settings\maya\Desktop\Games\samp03csvr_win32\pawno \Untitled.pwn(95) : warning 225: unreachable code
C:\Documents and Settings\maya\Desktop\Games\samp03csvr_win32\pawno \Untitled.pwn(95) : warning 217: loose indentation
C:\Documents and Settings\maya\Desktop\Games\samp03csvr_win32\pawno \Untitled.pwn(97) : warning 209: function "OnPlayerCommandText" should return a value
line 95 is return 0;
line 97 is the last }