Detaljan opis problema: Nasao sam komandu da izbacim igraca dok nije online,prilagodio sam je koliko je bilo potrebno,ali samo me jedna stvar muci. Steka mi oko provjere imena igraca.
Dio skripte:
command(izbaci, playerid, params[])
{
new PlayerName, string[ 128 ], Result = -1;
if( sscanf( params, "z", Name) )
{
SendClientMessage( playerid, WHITE, "SYNTAX: /remoteuninvite " );
SendClientMessage( playerid, RED, "NOTE: This command is CaSe SeNsItIvE." );
}
else
{
if (PlayerInfo >= 1)
{
if(strlen(PlayerName) >= 1 && strlen(PlayerName) < MAX_PLAYER_NAME)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected( i ) )
{
if(strcmp(GetPlayerName( i ), Name, true) == 0 )
{
Result = i;
}
}
}
if( Result == -1 )
{
format( string, sizeof( string ), "Korisnici/%s.ini", Name );
if( fexist( string ) )
{
if( dini_Isset( string, "Member" ) )
{
if( dini_Int( string, "Member" ) == PlayerInfo )
{
if( dini_Int( string, "Rank" ) > PlayerInfo )
{
SendClientMessage( playerid, WHITE, "You can't uninvite a higher rank." );
}
else
{
dini_IntSet( string, "Member", 0 );
dini_IntSet( string, "Rank", 0 );
format( string, sizeof( string ), "%s has left the group (remotely un-invited)", Name );
SendFamilyMessage( playerid, WHITE, string);
}
}
else
{
SendClientMessage( playerid, WHITE, "That person isn't in the same group as you." );
}
}
else
{
SendClientMessage( playerid, WHITE, "They are missing the player group variable." );
}
}
else
{
SendClientMessage( playerid, WHITE, "Invalid name." );
}
}
else
{
SendClientMessage( playerid, WHITE, "That player is connected, use /uninvite." );
}
}
else
{
SendClientMessage( playerid, WHITE, "Invalid name." );
}
}
else
{
SendClientMessage( playerid, WHITE, "You're not a Group Leader." );
}
}
return 1;
}Neke slike/video za lakse dobivanje pomoci(neobavezno):
Evo error:
C:\Documents and Settings\winxp\Desktop\CL gaming\Classic Life RolePlay\gamemodes\CLRP.pwn(25560) : warning 202: number of arguments does not match definition
C:\Documents and Settings\winxp\Desktop\CL gaming\Classic Life RolePlay\gamemodes\CLRP.pwn(25560) : warning 202: number of arguments does not match definition
C:\Documents and Settings\winxp\Desktop\CL gaming\Classic Life RolePlay\gamemodes\CLRP.pwn(25560) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.To je ova linija
if(strcmp(GetPlayerName( i ), Name, true) == 0 )