Jump to content
  • 0

error 028: invalid subscript (not an array or too many subscripts): "TimerRainbow"


Question

Posted (edited)

Buna ziua! Recent m-am apucat de un edit la gamemode-ul Burned! Cand am facut comanda rainbow am intampinat aceste erori:

1.C:\Users\Andrei\Desktop\Gamemode\Gamemode\gamemodes\gmm.pwn(14849) : error 028: invalid subscript (not an array or too many subscripts): "TimerRainbow"

2.C:\Users\Andrei\Desktop\Gamemode\Gamemode\gamemodes\gmm.pwn(14849) : error 001: expected token: ";", but found "]"

3.C:\Users\Andrei\Desktop\Gamemode\Gamemode\gamemodes\gmm.pwn(14849) : error 029: invalid expression, assumed zero

4.C:\Users\Andrei\Desktop\Gamemode\Gamemode\gamemodes\gmm.pwn(14849) : fatal error 107: too many error messages on one line

Linia: KillTimer(TimerRainbow[playerid]);

Comanda:

 YCMD:rainbowveh(playerid, params[], help) {
    if(PlayerInfo[playerid][pPremiumAccount] == 0) return SCM(playerid, COLOR_RED, "Nu detii cont premium!");
    if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid, COLOR_RED, "Nu te afli in niciun vehicul!");
    new time;
    if(sscanf(params, "i", time)) return SCM(playerid, -1, "Syntax: /rainbowveh");
    if(time < 0) return 1;
    KillTimer(TimerRainbow[playerid]);
    TimerRainbow[playerid] = SetTimerEx("RainbowChange", time true, "i", playerid);
    return 1;  }

Edited by AndyAdv

YCMD:copianuarevaloare(playerid, params[], help) {
    if(PlayerInfo[playerid][pCopiator] == 1) {
        PlayerInfo[playerid][pProstie] = 9999;
        SendClientMessage(playerid, COLOR_RED, "Felicitari! Ai primit +9999 prostie pentru ca esti un copiator infect");
    }
    return 1;
}

1 answer to this question

Recommended Posts

  • 0
Posted (edited)

YCMD:rainbowveh(playerid, params[], help)

{
    if(PlayerInfo[playerid][pPremiumAccount] == 0) return SCM(playerid, COLOR_RED, "Nu detii cont premium!");
    if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid, COLOR_RED, "Nu te afli in niciun vehicul!");
    TimerRainbow[playerid] = SetTimerEx("RainbowChange", 200, true, "i", playerid);
    return true; 

}

 

iti recomand sa faci o variabila pentru inchidere si deschidere (sa nu se buguiasca timerul cand dai de mai multe ori /rainbow)

[Rainbow]

La playerdata

YCMD:rainbowveh(playerid, params[], help)

{
    if(PlayerInfo[playerid][pPremiumAccount] == 0) return SCM(playerid, COLOR_RED, "Nu detii cont premium!");
    if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid, COLOR_RED, "Nu te afli in niciun vehicul!");
    if(PlayerInfo[playerid][RainBow] == 0) TimerRainbow[playerid] = SetTimerEx("RainbowChange", 200, true, "i", playerid);

    else if(PlayerInfo[playerid][Rainbow] == 1) KillTimer(TimerRainbow[playerid]);
    return true; 

}

Edited by Iulian1337

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.