Jump to content
  • 0

Ajutor scripting.


KiNGzOR

Question

Problema este asta:

Linia : if(!LapteVaca[playerid]) return SendClientMessage(playerid,-1, "SERVER : {FF00FF}Nu ai lapte! {00FF00}Du-te si mulge de la o vaca.");

C:\Users\Adrian-Bianca PC\Desktop\samp03\gamemodes\ExtremeGame.pwn(22385) : error 029: invalid expression, assumed zero
C:\Users\Adrian-Bianca PC\Desktop\samp03\gamemodes\ExtremeGame.pwn(22385) : warning 215: expression has no effect
C:\Users\Adrian-Bianca PC\Desktop\samp03\gamemodes\ExtremeGame.pwn(22385) : error 001: expected token: ";", but found "]"
C:\Users\Adrian-Bianca PC\Desktop\samp03\gamemodes\ExtremeGame.pwn(22385) : error 029: invalid expression, assumed zero
C:\Users\Adrian-Bianca PC\Desktop\samp03\gamemodes\ExtremeGame.pwn(22385) : fatal error 107: too many error messages on one line

 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0
52 minutes ago, Banditul said:

La ce ma pot gandi e faptul ca acea variabila LapteVaca nu e definita asa cum o folosesti 

Ex:

new LapteVaca;

Sau orice altceva decat

new LapteVaca[MAX_PLAYERS];

 

Am facut ca tine,insa imi da astea:

C:\Users\Adrian-Bianca PC\Desktop\samp03\gamemodes\ExtremeGame.pwn(22442) : error 028: invalid subscript (not an array or too many subscripts): "LapteVaca"
C:\Users\Adrian-Bianca PC\Desktop\samp03\gamemodes\ExtremeGame.pwn(22442) : warning 215: expression has no effect
C:\Users\Adrian-Bianca PC\Desktop\samp03\gamemodes\ExtremeGame.pwn(22442) : error 001: expected token: ";", but found "]"
C:\Users\Adrian-Bianca PC\Desktop\samp03\gamemodes\ExtremeGame.pwn(22442) : error 029: invalid expression, assumed zero
C:\Users\Adrian-Bianca PC\Desktop\samp03\gamemodes\ExtremeGame.pwn(22442) : fatal error 107: too many error messages on one line
 

Uite comanda daca ai nevoie:

CMD:goleste(playerid, params[])
{
    if(!IsPlayerInRangeOfPoint(playerid,5.0,-670.1496,969.9528,12.1328)) return SendClientMessage(playerid,0xFF444499,"SERVER : Depoziteaza laptele in hambar te rog!");
    if(!LapteVaca[playerid]) return SendClientMessage(playerid,-1, "SERVER : {FF00FF}Nu ai lapte! {00FF00}Dute si mulge de la o vaca.");
    GivePlayerMoney(playerid, 100000); // <<<<<<<<<< MODIFICA AICI SUMA DE LA JOB
    Update(playerid, pCashx);
    SendClientMessage(playerid,-1, "SERVER : {FFFFFF}Bravo! Ai golit laptele si ai primit: 100.000$ de la fermierul Nea Mitica");
    LapteVaca[playerid] = !LapteVaca[playerid];
    ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
    return 1;
}

Link to comment
Share on other sites

  • 0
57 minutes ago, Banditul said:

La ce ma pot gandi e faptul ca acea variabila LapteVaca nu e definita asa cum o folosesti 

Ex:

new LapteVaca;

Sau orice altceva decat

new LapteVaca[MAX_PLAYERS];

 

Am rezolvat,eu definisem cum zisesei prima data adica "new LapteVaca;",dar dupa mi-am dat seama ca trebuie new LapteVaca[MAX_PLAYERS];,mersi mult!

Edited by KiNGzOR
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.