Szerző Téma: Ennek mi a baja? :D /adminok  (Megtekintve 838 alkalommal)

Ennek mi a baja? :D /adminok
« Dátum: 2012. Március 16. - 17:40:24 »
0 Show voters
Csináltam egy ilyet:
 
CMD:adminok(playerid, params[])
{
    new string[256];
    new fstring[64];
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(level > 0))
        {
            new pname[MAX_PLAYER_NAME];
            GetPlayerName(i,pname, sizeof(pname));
            format(fstring, sizeof(fstring),\"{00bbff}%s (%i) - {ffffff}Szint: {00bbff}%i\\n\", pname, i, level);
            strcat(string, fstring, sizeof(string));
        }
    }
    ShowPlayerDialog(playerid,2563,DIALOG_STYLE_MSGBOX,\"{ff0000}Online Adminok\",string,\"OK\",\"\");
    return 1;
}

 
és hibát ír:
 
E:\\Documents and Settings\\Krisz\\Asztal\\[R]endõr [A]cademy\\filterscripts\\PC.pwn(279) : error 017: undefined symbol \"level\"
E:\\Documents and Settings\\Krisz\\Asztal\\[R]endõr [A]cademy\\filterscripts\\PC.pwn(279) : warning 215: expression has no effect
E:\\Documents and Settings\\Krisz\\Asztal\\[R]endõr [A]cademy\\filterscripts\\PC.pwn(279) : error 001: expected token: \";\", but found \"]\"
E:\\Documents and Settings\\Krisz\\Asztal\\[R]endõr [A]cademy\\filterscripts\\PC.pwn(279) : error 029: invalid expression, assumed zero
E:\\Documents and Settings\\Krisz\\Asztal\\[R]endõr [A]cademy\\filterscripts\\PC.pwn(279) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase
 
4 Errors.

Ennek mi a baja? :D /adminok
« Válasz #1 Dátum: 2012. Március 16. - 17:47:29 »
0 Show voters
#include sscanf megvan?

Ennek mi a baja? :D /adminok
« Válasz #2 Dátum: 2012. Március 16. - 17:49:58 »
0 Show voters
igen :)

Nem elérhető DrAkE

  • 2078
    • Profil megtekintése
Ennek mi a baja? :D /adminok
« Válasz #3 Dátum: 2012. Március 16. - 17:53:57 »
0 Show voters

if(level > 0))

 


if(level > 0)

Ennek mi a baja? :D /adminok
« Válasz #4 Dátum: 2012. Március 16. - 18:08:54 »
0 Show voters
E:\\Documents and Settings\\Krisz\\Asztal\\[R]endõr [A]cademy\\filterscripts\\PC.pwn(280) : error 017: undefined symbol \"level\"
E:\\Documents and Settings\\Krisz\\Asztal\\[R]endõr [A]cademy\\filterscripts\\PC.pwn(280) : warning 215: expression has no effect
E:\\Documents and Settings\\Krisz\\Asztal\\[R]endõr [A]cademy\\filterscripts\\PC.pwn(280) : error 001: expected token: \";\", but found \"]\"
E:\\Documents and Settings\\Krisz\\Asztal\\[R]endõr [A]cademy\\filterscripts\\PC.pwn(280) : error 029: invalid expression, assumed zero
E:\\Documents and Settings\\Krisz\\Asztal\\[R]endõr [A]cademy\\filterscripts\\PC.pwn(280) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase
 
4 Errors.

Nem elérhető DrAkE

  • 2078
    • Profil megtekintése
Ennek mi a baja? :D /adminok
« Válasz #5 Dátum: 2012. Március 16. - 18:11:14 »
0 Show voters
Nincs level nevû változód?!

Ennek mi a baja? :D /adminok
« Válasz #6 Dátum: 2012. Március 16. - 18:36:41 »
0 Show voters
nincs...

Ennek mi a baja? :D /adminok
« Válasz #7 Dátum: 2012. Március 16. - 19:29:57 »
0 Show voters
[pawn]new level[128];[/pawn]
Talán

Ennek mi a baja? :D /adminok
« Válasz #8 Dátum: 2012. Március 16. - 19:32:31 »
0 Show voters
Idézetet írta: Szabyxxx date=1331922597\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"18601\" data-ipsquote-contentclass=\"forums_Topic

new level[128];

 
Talán
 
Talán pont hogy
 
new level[MAX_PLAYERS];

Ennek mi a baja? :D /adminok
« Válasz #9 Dátum: 2012. Március 16. - 19:43:48 »
0 Show voters
nem hozza be az /adminok parancsot
SERVER: Unknown Command

Dupla hozzászólás automatikusan összefûzve. ( 2012. Március 16. - 19:47:10 )

Edit: Már nem írja ki de nem hozza be a dialogot.
« Utoljára szerkesztve: 2012. Március 16. - 19:47:10 írta Yakuza™ »

Nem elérhető DrAkE

  • 2078
    • Profil megtekintése
Ennek mi a baja? :D /adminok
« Válasz #10 Dátum: 2012. Március 17. - 08:54:11 »
0 Show voters
Idézetet írta: 1ST_Chr date=1331922751\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"18601\" data-ipsquote-contentclass=\"forums_Topic


 
new level[128];

 
Talán
 
Talán pont hogy
 
new level[MAX_PLAYERS];

 

[/quote]
Szerintem meg:
 

new level[MAX_PLAYERS char];

 
Használata:
 

level{playerid} = 1;

 
És nem, nem szögletes zárójel kell, hanem kapcsos zárójel.
Emelett:
 

new
string[ 1024 ],
egyeb[ 128 ],
i = -1;
for(;++i < MAX_PLAYERS;)
{
if((IsPlayerConnected( i ) ) && ( level[ i ] > 0) )
{
   GetPlayerName( i, string, MAX_PLAYER_NAME );
   format( egyeb, sizeof( egyeb ),\"{00bbff}%s (%i) - {ffffff}Szint: {00bbff}%i\\n\", string, i, level[ i ]);
   strins(string, egyeb, strlen( string ) );
}
     }
ShowPlayerDialog(playerid,2563,DIALOG_STYLE_MSGBOX,\"{ff0000}Online Adminok\",string,\"OK\",\"\");
« Utoljára szerkesztve: 2012. Március 17. - 08:59:43 írta DrAkE »

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal