Jump to content
  • 0

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


AndyAdv

Question

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;
}

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.