26 Errors with Array
#1

pawn Код:
CMD:engine(playerid, params[])
{
    if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        new vehicleid, string[128];
        vehicleid = GetPlayerVehicleID(playerid);
        if(GetVehicleModel(vehicleid) == 481 || GetVehicleModel(vehicleid) == 509 || GetVehicleModel(vehicleid) == 510) return SendClientMessageEx(playerid,COLOR_WHITE,"This command can't be used in this vehicle.");
        GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
        if(engine == VEHICLE_PARAMS_ON)
        {
            SetVehicleEngine(vehicleid, playerid);
        }
        else if((engine == VEHICLE_PARAMS_OFF || engine == VEHICLE_PARAMS_UNSET))
        {
            if(Fuel[vehicleid] < 1.0)
            {
                SendClientMessageEx(playerid, COLOR_GRAD2, " Your vehicle is out of fuel, it won't start!");
            }
            else
            {
                foreach(Player, i)
                {
                    for(new d=0; d<MAX_PLAYERVEHICLES; d++)
                    {
                        if(PlayerVehicleInfo[i][d][pvId] == vehicleid)
                        {
                            if(i == playerid)
                            else if(i == PlayerInfo[playerid][pVehicleKeysFrom])
                            {
                                if(!IsABike(vehicleid))
                                {
                                    SendClientMessageEx(playerid, COLOR_WHITE, "Vehicle engine starting, please wait...");
                                    SetTimerEx("SetVehicleEngine", 1000, 0, "dd",  vehicleid, playerid);
                                    format(string, sizeof(string), "* %s twists the key in the ignition, turning the engine on.", GetPlayerNameEx(playerid));
                                    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                                    return 1;
        }
                                else
                                {
                                    SendClientMessageEx(playerid, COLOR_WHITE, "Vehicle engine starting, please wait...");
                                    SetTimerEx("SetVehicleEngine", 700, 0, "dd",  vehicleid, playerid);
                                    format(string, sizeof(string), "* %s flips the killswitch to the on position and depresses the ignition switch, turning the engine on.", GetPlayerNameEx(playerid));
                                    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                                    return 1;
                                }
                            }
                            else
                            {
                                if(PlayerInfo[playerid][pHasCarJack] == 1)
                                {
                                    if(PlayerInfo[playerid][pJackingCar] == 1)
                                    {
                                        SendClientMessageEx(playerid, COLOR_GRAD2, "  You are already attempting to jack the car, please wait!");
                                        return 1;
                                    }
                                    else
                                    {
                                        format(string, sizeof(string), "* %s takes out a set of tools and attempts to wire the ignition.", GetPlayerNameEx(playerid));
                                        ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);

                                        SendClientMessageEx(playerid, COLOR_WHITE, "Attempting to wire the ignition...");
                                        GameTextForPlayer(playerid, "~r~Attempting to wire the ignition...", 10000, 3);

                                        SetTimerEx("WireIgnition", 10000, 0, "id", playerid, vehicleid);

                                        PlayerInfo[playerid][pJackingCar] =1;

                                        PlayerInfo[playerid][pJackAttempts] --;
                                        if(PlayerInfo[playerid][pJackAttempts] == 0)
                                        {
                                            PlayerInfo[playerid][pHasCarJack] =0;
                                            SendClientMessageEx(playerid, COLOR_WHITE, "This is your last attempt, the tool kit has worn down...");
                                        }
                                        return 1;
                                    }
                                }
                                else
                                {
                                    SendClientMessageEx(playerid, COLOR_GRAD2, "  You do not have the keys for this vehicle / any car jacking items to start the ignition!");
                                }
                            }
                        }
                        return 1;
}
Код:
C:\Users\pc\Desktop\SGRP\gamemodes\VGRP.pwn(2848) : error 017: undefined symbol "FixHour"
C:\Users\pc\Desktop\SGRP\gamemodes\VGRP.pwn(6059) : error 017: undefined symbol "splits"
C:\Users\pc\Desktop\SGRP\gamemodes\VGRP.pwn(6341) : error 017: undefined symbol "ini_GetKey"
C:\Users\pc\Desktop\SGRP\gamemodes\VGRP.pwn(6341) : error 033: array must be indexed (variable "key")
C:\Users\pc\Desktop\SGRP\gamemodes\VGRP.pwn(6343) : error 017: undefined symbol "Ini_Value"
C:\Users\pc\Desktop\SGRP\gamemodes\VGRP.pwn(6343) : error 033: array must be indexed (variable "val")
C:\Users\pc\Desktop\SGRP\gamemodes\VGRP.pwn(6345) : error 017: undefined symbol "Ini_Value"
C:\Users\pc\Desktop\SGRP\gamemodes\VGRP.pwn(6345) : error 033: array must be indexed (variable "val")
C:\Users\pc\Desktop\SGRP\gamemodes\VGRP.pwn(6347) : error 017: undefined symbol "Ini_Value"
C:\Users\pc\Desktop\SGRP\gamemodes\VGRP.pwn(6347) : error 033: array must be indexed (variable "val")
C:\Users\pc\Desktop\SGRP\gamemodes\VGRP.pwn(6349) : error 017: undefined symbol "Ini_Value"
C:\Users\pc\Desktop\SGRP\gamemodes\VGRP.pwn(6349) : error 033: array must be indexed (variable "val")
C:\Users\pc\Desktop\SGRP\gamemodes\VGRP.pwn(6351) : error 017: undefined symbol "Ini_Value"
C:\Users\pc\Desktop\SGRP\gamemodes\VGRP.pwn(6351) : error 033: array must be indexed (variable "val")
C:\Users\pc\Desktop\SGRP\gamemodes\VGRP.pwn(6353) : error 017: undefined symbol "Ini_Value"
C:\Users\pc\Desktop\SGRP\gamemodes\VGRP.pwn(6353) : error 033: array must be indexed (variable "val")
C:\Users\pc\Desktop\SGRP\gamemodes\VGRP.pwn(6355) : error 017: undefined symbol "Ini_Value"
C:\Users\pc\Desktop\SGRP\gamemodes\VGRP.pwn(6355) : error 033: array must be indexed (variable "val")
C:\Users\pc\Desktop\SGRP\gamemodes\VGRP.pwn(6357) : error 017: undefined symbol "Ini_Value"
C:\Users\pc\Desktop\SGRP\gamemodes\VGRP.pwn(6357) : error 033: array must be indexed (variable "val")
C:\Users\pc\Desktop\SGRP\gamemodes\VGRP.pwn(6359) : error 017: undefined symbol "Ini_Value"
C:\Users\pc\Desktop\SGRP\gamemodes\VGRP.pwn(6359) : error 033: array must be indexed (variable "val")
C:\Users\pc\Desktop\SGRP\gamemodes\VGRP.pwn(6361) : error 017: undefined symbol "Ini_Value"
C:\Users\pc\Desktop\SGRP\gamemodes\VGRP.pwn(6361) : error 033: array must be indexed (variable "val")
C:\Users\pc\Desktop\SGRP\gamemodes\VGRP.pwn(6363) : error 017: undefined symbol "Ini_Value"
C:\Users\pc\Desktop\SGRP\gamemodes\VGRP.pwn(6363) : error 033: array must be indexed (variable "val")

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


26 Errors.
I don't know how to make array , can you correct this?? and Reply me the Fixed CMD:ENGINE
Reply


Messages In This Thread
26 Errors with Array - by cedizon - 24.05.2014, 11:04
Re : 26 Errors with Array - by yusei - 24.05.2014, 11:28
Re: 26 Errors with Array - by cedizon - 24.05.2014, 11:44
Re : 26 Errors with Array - by yusei - 24.05.2014, 12:15

Forum Jump:


Users browsing this thread: 2 Guest(s)