21.07.2014, 23:18
Hola, miren estuve aprendiendo a utilizar sscanf y hice el siguiente comando, pero me salen dos errores:
Y me saltan dos errores:
Y son en estas dos lineas:
Ayudaa
Gracias de antemano
pawn Код:
CMD:banear(playerid, params[])
{
new Jugador[256], Razon[256], Razon2[256];
if(PlayersData[playerid][Admin] >= 5) return SendClientMessage(playerid, Color_Gris, "No estas logueado como administrador");
if(sscanf(params, "us", Jugador, Razon)) return SendClientMessage(playerid, Color_Gris, "Uso correcto: /ban [ID] [Razуn]");
{
new NombreDelJugador[MAX_PLAYER_NAME];
GetPlayerName(Jugador, NombreDelJugador, 45);
format(Razon2, sizeof(Razon2), "%s fue baneado por un administrador. Razуn: %s", NombreDelJugador, Razon);
SendClientMessageToAll(Color_Gris, Razon2);
Kick(Jugador);
}
return 1;
}
Код:
C:\Users\Servidor\Desktop\Escritorio\samp03e_svr_R2_win32\gamemodes\lvtdm.pwn(384) : error 035: argument type mismatch (argument 1) C:\Users\Servidor\Desktop\Escritorio\samp03e_svr_R2_win32\gamemodes\lvtdm.pwn(387) : error 035: argument type mismatch (argument 1) Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors.
pawn Код:
Kick(Jugador);
pawn Код:
GetPlayerName(Jugador, NombreDelJugador, 45);
Gracias de antemano