isnull problem
#1

PHP код:
CMD:up(playerid,params[])
{
  new 
TargetIDAmountFloat:X,Float:Y,Float:Z;
  if(!
IsPlayerAdmin(playerid)) return SendClientMessage(playerid,Red,"UnKnown Command! Type /cmds");
  if(
sscanf(params"ud",TargetID,Amount)) return SendClientMessage(playerid,Red,"Move up: /up <id>");
  if(!
IsPlayerConnected(TargetID)) return SendClientMessage(playerid,Red,"Player is not connected");
  if(!
IsPlayerInAnyVehicle(TargetID))
  {
    
GetPlayerPos(TargetID,X,Y,Z);
    
SetPlayerPos(TargetID,X,Y,Z+Amount);
  }
  else
  {
    
GetPlayerPos(TargetID,X,Y,Z);
    
SetVehiclePos(GetPlayerVehicleID(TargetID),X,Y,Z+Amount);
  }
  if(
isnull(Amount))
  {
    
GetPlayerPos(playerid,X,Y,Z);
    
SetPlayerPos(playerid,X,Y,Z+10);
  return 
1;

PHP код:
C:\Users\ituni_000\Desktop\Server\gamemodes\Untitled.pwn(318) : error 028invalid subscript (not an array or too many subscripts): "Amount"
C:\Users\ituni_000\Desktop\Server\gamemodes\Untitled.pwn(318) : error 029invalid expressionassumed zero
C
:\Users\ituni_000\Desktop\Server\gamemodes\Untitled.pwn(318) : error 028invalid subscript (not an array or too many subscripts): "Amount"
C:\Users\ituni_000\Desktop\Server\gamemodes\Untitled.pwn(318) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
4 Errors

Reply


Messages In This Thread
isnull problem - by BoU3A - 13.11.2014, 21:02
Re: isnull problem - by Kwarde - 13.11.2014, 21:05
Re: isnull problem - by Runn3R - 13.11.2014, 21:09
Re: isnull problem - by Kwarde - 13.11.2014, 21:14
Re: isnull problem - by BoU3A - 13.11.2014, 21:23
Re: isnull problem - by Runn3R - 13.11.2014, 21:35
Re: isnull problem - by BoU3A - 13.11.2014, 22:05
Re: isnull problem - by biker122 - 14.11.2014, 01:07

Forum Jump:


Users browsing this thread: 1 Guest(s)