Szerző Téma: Hiba  (Megtekintve 479 alkalommal)

Nem elérhető instant

  • 2778
  • ZzzzzZ
    • Profil megtekintése
Hiba
« Dátum: 2012. Július 29. - 13:33:12 »
0 Show voters
Üdv , elkezdtem 1  \"Hitman\" Rendszert de errort adott ki a vérdijak ki listázásakor
Kód:
 
CMD:hits(playerid,params[])
{
SendClientMessage(playerid,-1,\"Vérdijak:\");
for(new i=0;i<MAX_PLAYERS; i++)
{
new str[128],x;
format(str,sizeof(str),\"%s%s(%d): $%d\",str,pName(i),i,hit);
x++;
if(x > 3)
{
SendClientMessage(playerid,-1,str);
x = 0;
format(str, sizeof(str), \"\");
} else {
format(str, sizeof(str), \"%s, \", str);
}
}
}
if(x <= 3 && x > 0) {
str[strlen(str)-2] = \'.\';
SendClientMessage(playerid, COLOR_YELLOW, str);
}
return 1;
}

 
Errorok:
 
C:\\Documents and Settings\\X\\Dokumentumok\\Letöltések\\cdeathm_0.6.1\\vicc.pwn(54) : error 010: invalid function or declaration
C:\\Documents and Settings\\X\\Dokumentumok\\Letöltések\\cdeathm_0.6.1\\vicc.pwn(58) : error 010: invalid function or declaration
Pawn compiler 3.2.3664           Copyright © 1997-2006, ITB CompuPhase
2 Errors.
[/quote]

Nem elérhető DrAkE

  • 2078
    • Profil megtekintése
Hiba
« Válasz #1 Dátum: 2012. Július 29. - 13:58:30 »
+1 Show voters
Ilyen sz*r tagoltság mellet, nem is csodálkozom, hogy nem látod át a hibát.
 

CMD:hits(playerid,params[])
{
new str[128],
x,
i = -1;
SendClientMessage(playerid,-1,\"Vérdijak:\");
for(;++i<MAX_PLAYERS;)
{
format(str,sizeof(str),\"%s%s(%d): $%d\",str,pName(i),i,hit);
x++;
if(x > 3)
{
   SendClientMessage(playerid,-1,str);
   x = 0;
   format(str, sizeof(str), \"\");
} else {
   format(str, sizeof(str), \"%s, \", str);
}
}
if(x <= 3 && x > 0)
{
str[strlen(str)-2] = \'.\';
SendClientMessage(playerid, COLOR_YELLOW, str);
}
return 1;
}

 
Illetve az \'x\' értéke sose lesz nagyobb 1-nél, mivel te mindig létrehozod, ami nullázza, ezt a cikluson kívülre kell rakni.
« Utoljára szerkesztve: 2012. Július 29. - 14:01:08 írta DrAkE »

Nem elérhető instant

  • 2778
  • ZzzzzZ
    • Profil megtekintése
Hiba
« Válasz #2 Dátum: 2012. Július 29. - 14:01:58 »
0 Show voters
igazad van a tagoltságokról Drake
másrészt hibátlan köszönöm

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal