SA-MP Forums Archive
[Ayuda] stock & UserPath - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: [Ayuda] stock & UserPath (/showthread.php?tid=335837)



[Ayuda] stock & UserPath - Soi_salva - 20.04.2012

Hola a todos, buen dнa principalmente, hoy vengo con un nuevo problema.

Lo que pasa es que No se como solucionar el siguiente problema:

pawn Код:
#define UserPath   "%s.ini"

public OnPlayerDisconnect(playerid, reason){
    IfPlayerExist(playerid, UserPath);
}

stock IfPlayerExist(playerid, path)
{
    new PlayerName[MAX_PLAYERS], PrintPath[MAX_STRINGS]);
    GetPlayerName(playerid, PlayerName, sizeof(PlayerName);
    format(PrintPath, sizeof(PrintPath), path, PlayerName);
    if(file(path)) SendClientMessage(playerid, COLOR_VERDE, string);
}
pasa que me avienta error en esta linea IfPlayerExist(playerid, UserPath); & dice:
Код:
argument type mismatch (argument 2)
como puedo usar UserPath en el stock?...


Re: [Ayuda] stock & UserPath - Soi_salva - 20.04.2012

ahh ya lo solucione, perdуn...
coloque los corchetes en el stock ([])
ejemplo:
pawn Код:
stock IfPlayerExist(playerid, path[])
{
    new PlayerName[MAX_PLAYERS], PrintPath[MAX_STRINGS]);
    GetPlayerName(playerid, PlayerName, sizeof(PlayerName);
    format(PrintPath, sizeof(PrintPath), path, PlayerName);
    if(file(path)) SendClientMessage(playerid, COLOR_VERDE, string);
}

Gracias de todas formas


Respuesta: [Ayuda] stock & UserPath - Lunnatiicz - 22.04.2012

Si lo que quieres es verificar que el nombre del jugador estб creado usa simplemente 'fexist'