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

Problema cu comanda /stats. Editata de mine. Eroare:029


Question

Posted

Hi ^^ all boy's xD

Am o problema :D

Am editat comanda /stats din LuxAdmin. Am pus #define la ce am facut nou si "new" tot, dar imi da o eroare:

D:\Server SA-MP\Server SA-MP RS New World Of SA-MP V.3.2 0Admin and LuxAdmin E.T.C\Server SA-MP RS New World Of SA-MP V.3.2 0Admin and LuxAdmin E.T.C\filterscripts\LuxAdmin.pwn(1604) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
Si comanda intreaga este:
#if USE_STATS == true
dcmd_stats(playerid,params[]) {
    new rankid = pRank[playerid];
    new plName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, plName, sizeof(plName));
   	new rank[20];
   	if(pRank[playerid] == 0) { rank = "Newbie"; }
    else if(pRank[playerid] == 1) { rank = "Baby Killa'"; }
    else if(pRank[playerid] == 2) { rank = "Soldier"; }
    else if(pRank[playerid] == 3) { rank = "Gangsta'"; }
    else if(pRank[playerid] == 4) { rank = "Underboss"; }
    else if(pRank[playerid] == 5) { rank = "Tha' Boss"; }
    new string[9999], sL[50], sI[500], pDeaths, player1, h, m, s;
    if(!strlen(params)) player1 = playerid;
    else player1 = strval(params);

    if(IsPlayerConnected(player1)) {
        TotalGameTime(player1, h, m, s);
        if(AccInfo[player1][Deaths] == 0) pDeaths = 1; else pDeaths = AccInfo[player1][Deaths];
        format(sL, sizeof(sL), "{fff000}+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+");
        format(sI, sizeof(sI), "{00FF19}Rang: {00CEFC}%d ({FC0303}%s{00FF19})\n{00FF19}Admin Level: {00CEFC}%d\n{00FF19}Warn: {00CEFC}%d\n{00FF19}Data Inregistrare: {00CEFC}%d",rankid,rank,AccInfo[player1][Level],AccInfo[player1][Warnings],AccInfo[player1][RegisteredDate]);
        format(string, sizeof(string),"%s\n{FC0303}%s{00FF19}'s Status\n%s\n{00FF19}Jucatori Ucisi:{00CEFC}%d\n{00FF19}Decedari:{00CEFC}%d\n{00FF19}Ratie:{00CEFC}%0.2f\n{00FF19}Bani:{00CEFC}$%d\n{00FF19}Ore Jucate:\n{00CEFC}%d{FC0303}*{00FF19}H\n{00CEFC}%d{FC0303}*{00FF19}Min\n{00CEFC}%d{FC0303}*{00FF19}Sec\n\%s\n%s",sL,PlayerName2(player1),sL,AccInfo[player1][Kills],AccInfo[player1][Deaths],Float:AccInfo[player1][Kills]/Float:pDeaths,GetPlayerMoney(player1),h,m,s,sI,sL);
        return ShowPlayerDialog(playerid, 758, 0, "{2BFF00}Status Jucator", string, "Ok", "");
    } else return SendClientMessage(playerid, red, "Jucatorul nu este Conectat!");
}
#endif
Linia la care da Eroare este:
    } else return SendClientMessage(playerid, red, "Jucatorul nu este Conectat!");

Sper sa ma poata ajuta cineva. Ii multumesc celui care ma ajuta >.>

Thanks all xD


F*ck everybody who want and who try to judge me for who I am, b*star*s !

 

 

5 answers to this question

Recommended Posts

Posted

} else return SendClientMessage(playerid, COLOR_RED, "Jucatorul nu este Conectat!");

Incearca asa

lol...ce prostie doar daca inlocuieti red cu COLOR_RED crezi ca merge?:))..

ON:incearca sa faci asa:

} 
else
{
 SendClientMessage(playerid, red, "Jucatorul nu este Conectat!");
}
#endif

Fara reclama in semnatura!

Posted

ON:incearca sa faci asa:

} 
else
{
 SendClientMessage(playerid, red, "Jucatorul nu este Conectat!");
}
#endif

Apropo de prostii ... ^^^

N-am idee de ce da eroarea aia, dar o mica sugestie: micsoreaza string[9999], 9999 e numarul de caractere, si nu prea cred ca ala are 9999 caractere, ajunge si 2048, daca nu pune 4096. Acel numar dintre [ si ] face .amx-ul mai mare si face compilarea sa dureze mult.

Posted

@!!=-[GZS]stuntman-=!! --> Mersi ca ai spus acea sugestie o[^-^]o

@xxSPEEDYxx                  --> Nu a functionat de loc, lam aranjat de 5 ori si dadea Erori peste Erori!

@All                                  --> Va multumesc, nu mai am nevoie de ajutor. Voi incerca sa fac in alte stiluri.

Bye Bye All and GoodNight ^^


F*ck everybody who want and who try to judge me for who I am, b*star*s !

 

 

Guest
This topic is now closed to further replies.
×
×
  • 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.