Jump to content
Autentificarea cu Google și Facebook nu mai este disponibilă. ×
  • 0

Ajutor scripting.


Question

Posted

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

 

3 answers to this question

Recommended Posts

  • 0
Posted

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

 

  • 0
Posted
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;
}

  • 0
Posted (edited)
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

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.