Jump to content
  • 0

Question

Posted

Salut SA-Mp.ro, am incorporat intr-un GM sistemul ladmin si m-am intalnit cu cateva erori care nu le pot ocoli:

[pawn]

(416) : error 017: undefined symbol "PlayerName"

(417) : error 017: undefined symbol "PlayerName"

(417) : error 017: undefined symbol "PlayerName"

(418) : error 017: undefined symbol "PlayerName"

(425) : error 017: undefined symbol "PlayerName"

(430) : error 017: undefined symbol "PlayerName2"

(443) : error 017: undefined symbol "PlayerName"

(446) : error 017: undefined symbol "SaveToFile"

(448) : error 017: undefined symbol "NameKick"

(450) : error 017: undefined symbol "BadNameCount"

(452) : error 017: undefined symbol "BadNames"

(452) : warning 215: expression has no effect

(452) : error 001: expected token: ";", but found "]"

(452) : error 029: invalid expression, assumed zero

(452) : fatal error 107: too many error messages on one line

[/pawn]

Sunt multe erori, ashai? :D, Iata liniile:

Linia 416

[pawn]if ( strlen( pAKA ) < 3 ) format( str, sizeof( str ),"*** {FFFF00}%s(%d) {ACACAC}has joined the server", PlayerName( playerid ), playerid ); [/pawn]

Linia 417

[pawn]else if ( !strcmp( pAKA, PlayerName( playerid ), true ) ) format( str, sizeof( str ),"*** {FFFF00}%s(%d) {ACACAC}has joined the server", PlayerName( playerid ), playerid ); [/pawn]

Linia 418

[pawn]else format( str, sizeof( str ),"*** {FFFF00}%s(%d) {ACACAC}has joined the server ( AKA: {FFFF00}%s{ACACAC} )", PlayerName( playerid ), playerid, pAKA ); [/pawn]

Linia 425

[pawn]format( str, sizeof( str ),"*** {FFFF00}%s(%d) {ACACAC}has joined the server", PlayerName( playerid ), playerid ); [/pawn]

Linia 430

[pawn]if ( dUserINT( PlayerName2( playerid ) ).( "Banned" ) == 1 ) [/pawn]

Linia 443

[pawn]format( str2, sizeof( str2 ),"*** {FFFF00}%s (ID:%d) {ACACAC}was auto kicked. Reason: {33CCFF}Name banned from server!", PlayerName( playerid ), playerid ); [/pawn]

Linia 446

[pawn]SaveToFile( "KickLog", str2 ); [/pawn]

Linia 448

[pawn]if ( ServerInfo[ NameKick ] == 1 ) [/pawn]

Linia 450

[pawn]for ( new s = 0; s < BadNameCount; s++ ) [/pawn]

Linia 452

[pawn]if ( !strcmp( BadNames[ s ], PlayerName( playerid ), true ) ) [/pawn]

Si cam atat!! Ajutor !

9 answers to this question

Recommended Posts

Posted

stock PlayerName(playerid)

{

    new nume[MAX_PLAYER_NAME];

    GetPlayerName(playerid, nume, sizeof(nume));

    return nume;

}

 

1859311972_BANNER-GIREADAcopy-min.thumb.png.48e5e420ae2185dce5b244965a1d2601.png

 

Posted

stock PlayerName(playerid)

{

    new nume[MAX_PLAYER_NAME];

    GetPlayerName(playerid, nume, sizeof(nume));

    return nume;

}

Nu merge ce mi-ai dat, adica definitia :(, Am mai multe erori de la ea.

[pawn]

(408) : error 029: invalid expression, assumed zero

(408) : error 017: undefined symbol "PlayerName"

(412) : error 090: public functions may not return arrays (symbol "Streamer_OnPlayerConnect")

[/pawn]

Linia 408:

[pawn]stock PlayerName(playerid)[/pawn]

Linia 412

[pawn]return nume;[/pawn]

:D

Posted

Unde ai pus aceasta functie?

Poi am pus-o inainte de scriptul LAdmin ..

[pawn]

//--------------LAdmin-----------------------------//

stock PlayerName(playerid)

{

    new nume[MAX_PLAYER_NAME];

    GetPlayerName(playerid, nume, sizeof(nume));

    return nume;

}

  //------Mai sunt aici cateva definitii------//

sI deja aici este inceputul scriptului.......

[/pawn]

Posted

Puneo dupa includere.

Mersi Frate, am mai redus din erori, acum n-am erori cu PlayerName

Dar am aceste erori:

[pawn]

(436) : error 017: undefined symbol "PlayerName2"

(452) : error 017: undefined symbol "SaveToFile"

(454) : error 017: undefined symbol "NameKick"

(456) : error 017: undefined symbol "BadNameCount"

(458) : error 017: undefined symbol "BadNames"

(458) : warning 215: expression has no effect

(458) : error 001: expected token: ";", but found "]"

(458) : error 029: invalid expression, assumed zero

(458) : fatal error 107: too many error messages on one line

[/pawn]

Ideas?

Iata si liniile daca ai nevoie

Linia 436

[pawn]if ( dUserINT( PlayerName2( playerid ) ).( "Banned" ) == 1 )[/pawn]

Linia 452

[pawn]SaveToFile( "KickLog", str2 );[/pawn]

Linia 454

[pawn]if ( ServerInfo[ NameKick ] == 1 )[/pawn]

Linia 456

[pawn]for ( new s = 0; s < BadNameCount; s++ )[/pawn]

Linia 458

[pawn]if ( !strcmp( BadNames[ s ], PlayerName( playerid ), true ) )[/pawn]

Posted

Mersi Frate, am mai redus din erori, acum n-am erori cu PlayerName

Dar am aceste erori:

[pawn]

(436) : error 017: undefined symbol "PlayerName2"

(452) : error 017: undefined symbol "SaveToFile"

(454) : error 017: undefined symbol "NameKick"

(456) : error 017: undefined symbol "BadNameCount"

(458) : error 017: undefined symbol "BadNames"

(458) : warning 215: expression has no effect

(458) : error 001: expected token: ";", but found "]"

(458) : error 029: invalid expression, assumed zero

(458) : fatal error 107: too many error messages on one line

[/pawn]

Ideas?

Iata si liniile daca ai nevoie

Linia 436

[pawn]if ( dUserINT( PlayerName2( playerid ) ).( "Banned" ) == 1 )[/pawn]

Linia 452

[pawn]SaveToFile( "KickLog", str2 );[/pawn]

Linia 454

[pawn]if ( ServerInfo[ NameKick ] == 1 )[/pawn]

Linia 456

[pawn]for ( new s = 0; s < BadNameCount; s++ )[/pawn]

Linia 458

[pawn]if ( !strcmp( BadNames[ s ], PlayerName( playerid ), true ) )[/pawn]

stock PlayerName2(playerid)

{

    new nume2[MAX_PLAYER_NAME];

    GetPlayerName(playerid, nume2, sizeof(nume2));

    return nume2;

}

stock SaveToFile( filename[], text[] )

{

new

File:rStuntFile,

filepath[256],

string[256],

year,

month,

day,

hour,

minute,

second;

getdate( year, month, day );

gettime( hour, minute, second );

format( filepath, sizeof filepath ,"/Logs/%s.txt",filename);

rStuntFile = fopen( filepath,io_append);

format( string, sizeof string,"[ %d.%d.%d %d:%d:%d ] %s \r\n", day, month, year, hour, minute, second, text );

fwrite( rStuntFile,string);

fclose( rStuntFile);

return 1;

}

e facut dupa modelul din ladmin xD

idiots.png
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.