Litle help please
#1

Hi guys, i've got this errors:

Код:

C:\Users\Administrator\Desktop\Iron City 0.3c [2.0]\gamemodes\IC-RP.pwn(3103) : error 028: invalid subscript (not an array or too many subscripts): "OwnableVehicle"
C:\Users\Administrator\Desktop\Iron City 0.3c [2.0]\gamemodes\IC-RP.pwn(3103) : warning 215: expression has no effect
C:\Users\Administrator\Desktop\Iron City 0.3c [2.0]\gamemodes\IC-RP.pwn(3103) : error 001: expected token: ";", but found "]"
C:\Users\Administrator\Desktop\Iron City 0.3c [2.0]\gamemodes\IC-RP.pwn(3103) : error 029: invalid expression, assumed zero
C:\Users\Administrator\Desktop\Iron City 0.3c [2.0]\gamemodes\IC-RP.pwn(3103) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
the line 3103 is:

Код:
if(OwnableVehicle[result] == PlayerInfo[playerid][pCarKey1]) { }
Full code:

Код:
               		if(OwnableVehicleID(result))
               		{
               		    if(OwnableVehicle[result] == PlayerInfo[playerid][pCarKey1]) { }
               		    else if(OwnableVehicle[result] == PlayerInfo[playerid][pCarkey2]) { }
               		    else if(OwnableVehicle[result] == PlayerInfo[playerid][pCarkey3]) { }
               		    else
               		    {
			               	SendClientMessage(playerid, COLOR_GREY, "  Bagagliaio Chiuso !");
			 				return 1;
						}
					}
Reply
#2

why you have { then } with no functions in it? if you want it to do nothing, than return 0 like
pawn Код:
// Not { }
// But { return 0; }
Reply
#3

Quote:
Originally Posted by admantis
Посмотреть сообщение
why you have { then } with no functions in it? if you want it to do nothing, than return 0 like
pawn Код:
// Not { }
// But { return 0; }
Took the word out of my mouth
Reply
#4

Doesn't works. this is my full command:

pawn Код:
COMMAND:bagagliaio(playerid, params[])
{
    new x_nr[128];
    if(sscanf(params, "s[128]", x_nr)) SendClientMessage(playerid,  COLOR_GREEN, "USA: /bagagliaio [info]");
    else
    {
        if (PlayerInfo[playerid][pPlayerLogged] == 0) return SendClientMessage(playerid, COLOR_WHITE, "SERVER: Devi Loggarti.");
        if(strcmp(x_nr, "info", true) == 0)
        {
             new counter = 0;
             new result;
             new plyName[MAX_PLAYER_NAME];

             GetPlayerName(playerid, plyName, MAX_PLAYER_NAME);
             GiveNameSpace(plyName);
             for(new i; i != MAX_VEHICLES; i++)
             {
                new dist = CheckPlayerDistanceToVehicle(3.5, playerid, i);
                if(dist)
                {
                    result = i;
                    counter++;
                }
            }
            switch(counter)
            {
                case 0:
                {
                    SendClientMessage(playerid, COLOR_GREY, "   Non ci sono auto con Bagagliaio intorno a te!");
                }

                case 1:
                {
                    if(IsPlayerInAnyVehicle(playerid))
                    {
                        SendClientMessage(playerid, COLOR_GREY, "  Non puoi aprire il bagagliaio mentre sei in auto");
                        return 1;
                    }
                    if(OwnableVehicleID(result))
                    {
                        if(OwnableVehicle[result] == PlayerInfo[playerid][pCarKey1]) { return 0; }
                        else if(OwnableVehicle[result] == PlayerInfo[playerid][pCarkey2]) { return 0; }
                        else if(OwnableVehicle[result] == PlayerInfo[playerid][pCarkey3]) { return 0; }
                        else
                        {
                            SendClientMessage(playerid, COLOR_GREY, "  Bagagliaio Chiuso !");
                            return 1;
                        }
                    }
                    if(IsNotAEngineCar(result))
                    {
                        SendClientMessage(playerid, COLOR_GREY, "  Questo veicolo non ha un Bagagliaio !");
                        return 1;
                    }

                    default:
                    {
                        SendClientMessage(playerid, COLOR_GREY, "   Ci sono troppe auto intorno");
                        return 1;
                    }
                }
                return 1;
            }
        }
    }
    return 1;
}
Reply
#5

u have default in case 1.
Reply
#6

Dont works
Reply
#7

Anyone please?
Reply
#8

Bump
Reply
#9

Bump again
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)