13.11.2012, 18:08
Hi all I have a problem with this Script in my GM:
And gives this errors but in know this is not all:
Helllppppp
pawn Код:
if ( ServerInfo[ ConnectMessages ] == 1 )
{
new str[ 256 ], pAKA[ 256 ];
pAKA = dini_Get( "ladmin/config/aka.txt", tmp3 );
if ( strlen( pAKA ) < 3 ) format( str, sizeof( str ),"*** {FFFF00}%s(%d) {ACACAC}has joined the server", PlayerName( playerid ), playerid );
else if ( !strcmp( pAKA, PlayerName( playerid ), true ) ) format( str, sizeof( str ),"*** {FFFF00}%s(%d) {ACACAC}has joined the server", PlayerName( playerid ), playerid );
else format( str, sizeof( str ),"*** {FFFF00}%s(%d) {ACACAC}has joined the server ( AKA: {FFFF00}%s{ACACAC} )", PlayerName( playerid ), playerid, pAKA );
for ( new i = 0; i < MAX_PLAYERS; i++ ) if ( IsPlayerConnected( i ) && playerid != i )
{
if ( PlayerInfo[ i ][ Level ] > 2 ) SendClientMessage( i, COLOR_GREY, str );
else
{
format( str, sizeof( str ),"*** {FFFF00}%s(%d) {ACACAC}has joined the server", PlayerName( playerid ), playerid );
SendClientMessage( i, COLOR_GREY, str );
}
}
}
if ( dUserINT( PlayerName2( playerid ) ).( "Banned" ) == 1 )
{
new str2[ 256 ];
SendClientMessage( playerid, -1, " " );
SendClientMessage( playerid, -1, " " );
SendClientMessage( playerid, -1, " " );
SendClientMessage( playerid, -1, " " );
SendClientMessage( playerid, -1, " " );
SendClientMessage( playerid, -1, " " );
SendClientMessage( playerid, -1, " " );
SendClientMessage( playerid, COLOR_GREY, "This name is {FFFF00}BANNED {ACACAC}from this server!" );
Kick( playerid );
format( str2, sizeof( str2 ),"*** {FFFF00}%s (ID:%d) {ACACAC}was auto kicked. Reason: {33CCFF}Name banned from server!", PlayerName( playerid ), playerid );
SendClientMessageToAll( COLOR_GREY, str2 );
print( str2 );
SaveToFile( "KickLog", str2 );
}
if ( ServerInfo[ NameKick ] == 1 )
{
for ( new s = 0; s < BadNameCount; s++ )
{
if ( !strcmp( BadNames[ s ], PlayerName( playerid ), true ) )
{
SendClientMessage( playerid, COLOR_GREY, "Your name is on our {FFFF00}black list, {ACACAC}you have been kicked." );
format( string, sizeof( string ),"*** {FFFF00}%s (ID:%d) {ACACAC}was auto kicked. (Reason: {33CCFF}Forbidden name{ACACAC})",PlayerName( playerid ), playerid );
SendClientMessageToAll( COLOR_GREY, string );
print( string );
SaveToFile( "KickLog", string ); Kick( playerid );
return 1;
}
}
}
if ( ServerInfo[ PartNameKick ] == 1 )
{
for ( new s = 0; s < BadPartNameCount; s++ )
{
new pos;
while ( ( pos = strfind( PlayerName( playerid ), BadPartNames[ s ], true ) ) != -1 ) for ( new i = pos, j = pos + strlen( BadPartNames[ s ] ); i < j; i++ )
{
SendClientMessage( playerid, COLOR_GREY, "Your name is not allowed on this server, you have been kicked." );
format( string, sizeof( string ),"**** {FFFF00}%s (ID:%d) {ACACAC}was auto kicked. (Reason: {33CCFF}Forbidden name{ACACAC})",PlayerName( playerid ), playerid );
SendClientMessageToAll( COLOR_GREY, string ); print( string );
SaveToFile( "KickLog", string ); Kick( playerid );
return 1;
}
}
}
if ( ServerInfo[ Locked ] == 1 )
{
PlayerInfo[ playerid ][ AllowedIn ] = false;
SendClientMessage( playerid, COLOR_ULTRARED,"Server is Locked! You have {FFFF00}20 {E60000}seconds to enter the server password before you are kicked!" );
SendClientMessage( playerid, COLOR_ULTRARED,"Type {FFFFFF}/password [password]" );
LockKickTimer[ playerid ] = SetTimerEx( "AutoKick", 20000, 0, "i", playerid );
}
if ( strlen( dini_Get( "ladmin/config/aka.txt", tmp3 ) ) == 0 ) dini_Set( "ladmin/config/aka.txt", tmp3, PlayerName( playerid ) );
else
{
if ( strfind( dini_Get("ladmin/config/aka.txt", tmp3 ), PlayerName( playerid ), true ) == -1 )
{
format( string, sizeof( string ),"%s,%s", dini_Get("ladmin/config/aka.txt", tmp3 ), PlayerName( playerid ) );
dini_Set( "ladmin/config/aka.txt", tmp3, string );
}
}
SendClientMessage( playerid, COLOR_WHITE,"Welcome to {0000BB}Romania {FFFF00}Apocalypse {E60000}Stunt {FFFFFF}for more please type {33CCFF}/help{FFFFFF}!" );
SendClientMessage( playerid, COLOR_WHITE,"Use {E60000}/house {FFFFFF}to find information on our houses" );
SendClientMessage( playerid, COLOR_WHITE,"Type {33CCFF}/cmds {FFFFFF}for all commands !" );
SendClientMessage( playerid, COLOR_WHITE,"Use {E60000}/ro {FFFFFF}if you are român or {E60000}/eng {FFFFFF}if you are English." );
SendClientMessage( playerid, COLOR_WHITE,"Type {33CCFF}/teles {FFFFFF}to see teleportation on the server." );
SendClientMessage( playerid, COLOR_WHITE,"If you need a vehicle type {E60000}/V {FFFFFF}and if you want to tune cars write {E60000}/tune" );
TextDrawShowForPlayer( playerid, Weilcome );
TextDrawShowForPlayer( playerid, TO );
TextDrawShowForPlayer( playerid, Steam1 );
TextDrawShowForPlayer( playerid, Steam2 );
TextDrawShowForPlayer( playerid, Steam3 );
TextDrawShowForPlayer( playerid, HelpT );
TextDrawShowForPlayer( playerid, RulesT );
TextDrawShowForPlayer( playerid, CmdsT );
TextDrawShowForPlayer( playerid, TelesT );
TextDrawShowForPlayer( playerid, Steluta1 );
TextDrawShowForPlayer( playerid, Steluta2 );
if ( !udb_Exists( PlayerName2( playerid ) ) )
{
new rstr[ 256 ];
format( rstr, sizeof( rstr ), "{FFFFFF}Welcome {FFFF00}%s {FFFFFF}on {0000BB}Romania {FFFF00}Apocalypse {E60000}Stunt\n\n{FFFFFF}Please register to save your stats!: {FF5500}Score, Money, Coins...\n{FF5500}Password:", PlayerName( playerid ) );
ShowPlayerDialog( playerid, RegDialog, DIALOG_STYLE_INPUT, "{E60000}Register", rstr,"Register", "Let's Play" );
}
else
{
PlayerInfo[ playerid ][ Registered ] = 1;
format( file, sizeof( file ),"/ladmin/users/%s.sav", udb_encode( PlayerName( playerid ) ) );
new tmp2[ 256 ]; tmp2 = dini_Get( file,"ip" );
if ( ( !strcmp( tmp3, tmp2, true ) ) && ( ServerInfo[ AutoLogin ] == 1 ) )
{
LoginPlayer( playerid );
if ( PlayerInfo[ playerid ][ Level ] > 0 )
{
format( string, sizeof( string ),"\t\t{ACACAC}ACCOUNT:\n{FFFFFF}You have been automatically LoggedIn\n\n{FFFFFF}Admin Level: {00FF00}%d {FFFFFF}\n\n{FFFFFF}V.I.P Level: {00FF00}%d", PlayerInfo[ playerid ][ Level ], PlayerInfo[ playerid ][ pVip ] );
ShowPlayerDialog( playerid, OnLogin, DIALOG_STYLE_MSGBOX, "{00FF00}Logged in", string, "Quit", "" );
}
else ShowPlayerDialog( playerid, OnLogin, DIALOG_STYLE_MSGBOX, "{00FF00}Logged in", "\t\t{ACACAC}ACCOUNT:\n{FFFFFF}You have been automatically LoggedIn\n\n{FFFFFF}Admin Level: {00FF00}0 {FFFFFF}\n\n{FFFFFF}V.I.P Level: {00FF00}0", "Quit", "" );
}
else SendClientMessage( playerid, COLOR_GREEN, "ACCOUNT: {FFFFFF}This nickname is registed, you can now login by typing {00FF00}/login [Password]" );
}
return 1;
}
pawn Код:
C:\RAS(1).pwn(178) : error 006: must be assigned to an array
C:\RAS(1).pwn(293) : error 017: undefined symbol "ServerInfo"
C:\RAS(1).pwn(293) : error 017: undefined symbol "ConnectMessages"
C:\RAS(1).pwn(293) : error 029: invalid expression, assumed zero
C:\RAS(1).pwn(293) : fatal error 107: too many error messages on one line