31.12.2011, 11:40
So um I have this command:
I am sure that there is something wrong with the " else return " after every function there, so I forgot how to make them, Can you fix that for me please?
Error log:
pawn Код:
YCMD:buynitro(playerid, params[])
{
if(IsPlayerDriver(playerid)) else return SCM(playerid, COLOR_GREY, "You're not in a vehicle");
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, -216.4033,1048.0056,19.7422)) else return SCM(playerid, COLOR_GREY, "You're not at Nitrous Shop");
{
if(PlayerInfo[playerid][VehNitro] == 0) else return SCM(playerid, COLOR_GREY, "You already have Nitrous in your vehicle.");
{
PlayerInfo[playerid][VehNitro] = 1;
}
}
}
return 1;
}
Error log:
pawn Код:
C:\Documents and Settings\Administrator\My Documents\Downloads\samp03dsvr_R2_win32\gamemodes\bc.pwn(2417) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator\My Documents\Downloads\samp03dsvr_R2_win32\gamemodes\bc.pwn(2417) : warning 215: expression has no effect
C:\Documents and Settings\Administrator\My Documents\Downloads\samp03dsvr_R2_win32\gamemodes\bc.pwn(2417) : error 001: expected token: ";", but found "return"
C:\Documents and Settings\Administrator\My Documents\Downloads\samp03dsvr_R2_win32\gamemodes\bc.pwn(2418) : warning 225: unreachable code
C:\Documents and Settings\Administrator\My Documents\Downloads\samp03dsvr_R2_win32\gamemodes\bc.pwn(2419) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator\My Documents\Downloads\samp03dsvr_R2_win32\gamemodes\bc.pwn(2419) : warning 215: expression has no effect
C:\Documents and Settings\Administrator\My Documents\Downloads\samp03dsvr_R2_win32\gamemodes\bc.pwn(2419) : error 001: expected token: ";", but found "return"
C:\Documents and Settings\Administrator\My Documents\Downloads\samp03dsvr_R2_win32\gamemodes\bc.pwn(2420) : warning 225: unreachable code
C:\Documents and Settings\Administrator\My Documents\Downloads\samp03dsvr_R2_win32\gamemodes\bc.pwn(2421) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator\My Documents\Downloads\samp03dsvr_R2_win32\gamemodes\bc.pwn(2421) : warning 215: expression has no effect
C:\Documents and Settings\Administrator\My Documents\Downloads\samp03dsvr_R2_win32\gamemodes\bc.pwn(2421) : error 001: expected token: ";", but found "return"
C:\Documents and Settings\Administrator\My Documents\Downloads\samp03dsvr_R2_win32\gamemodes\bc.pwn(2422) : warning 225: unreachable code
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
6 Errors.