09.01.2010, 21:41
Miren, intento hacer que el skin de un jugador que llevaba la ъltima vez no se pierda cuando sale. Hice una cosa en OnPlayerDissconect con Dini, pero me daba errores asн que lo quitй
public OnPlayerDisconnect(playerid, reason)
{
new Pname[24];
GetPlayerName(playerid, Pname, 24);
new file[128];
format(file,sizeof(file),"\\skins\\%s.ini",udb_encode(Pname));
dini_IntSet(file, "skin", GetPlayerSkin(playerid));
return 1;
}
public OnPlayerSpawn(playerid)
{
new Pname[24];
GetPlayerName(playerid, Pname, 24);
new file[128];
format(file,sizeof(file),"\\skins\\%s.ini",udb_encode(Pname));
if(!dini_Exists(file))
dini_Create(file);
else
SetPlayerSkin(playerid, dini_Int(file, "skin"));
return 1;
}
C:\Documents and Settings\Compaq_Administrator\My Documents\san andreas\BASE jump\gamemodes\Jumping.pwn(467) : error 017: undefined symbol "udb_encode"
C:\Documents and Settings\Compaq_Administrator\My Documents\san andreas\BASE jump\gamemodes\Jumping.pwn(468) : error 017: undefined symbol "dini_IntSet"
C:\Documents and Settings\Compaq_Administrator\My Documents\san andreas\BASE jump\gamemodes\Jumping.pwn(477) : error 017: undefined symbol "udb_encode"
C:\Documents and Settings\Compaq_Administrator\My Documents\san andreas\BASE jump\gamemodes\Jumping.pwn(478) : error 017: undefined symbol "dini_Exists"
C:\Documents and Settings\Compaq_Administrator\My Documents\san andreas\BASE jump\gamemodes\Jumping.pwn(479) : error 017: undefined symbol "dini_Create"
C:\Documents and Settings\Compaq_Administrator\My Documents\san andreas\BASE jump\gamemodes\Jumping.pwn(481) : error 017: undefined symbol "dini_Int"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
6 Errors.
C:\Documents and Settings\Compaq_Administrator\My Documents\san andreas\BASE jump\gamemodes\Jumping.pwn(458) : error 017: undefined symbol "udb_encode"
C:\Documents and Settings\Compaq_Administrator\My Documents\san andreas\BASE jump\gamemodes\Jumping.pwn(468) : error 017: undefined symbol "udb_encode"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.
#define udb_encode //arriva
enum pInfo
{
pSkin
}
new PlayerInfo[MAX_PLAYERS][pInfo];
public OnPlayerSpawn(playerid)
{
new Nombre[MAX_PLAYERS];
new file[100];
GetPlayerName(playerid, Nombre, sizeof(Nombre));
format(file, sizeof(file), "%s.ini", Nombre);
if(fexist(file))
{
SetPlayerSkin(playerid, dini_Int(file, "Skin");
}
}
public OnPlayerDisconnect(playerid)
{
new Nombre[MAX_PLAYERS];
new file[100];
GetPlayerName(playerid, Nombre, sizeof(Nombre));
format(file, sizeof(file), "%s.ini", Nombre);
if(fexist(file))
{
dini_IntSet(file, "Skin", GetPlayerSkin(playerid));
}
else
{
dini_Create(file);
dini_IntSet(file, "Skin", GetPlayerSkin(playerid));
}
}
C:\Documents and Settings\Compaq_Administrator\My Documents\san andreas\BASE jump\gamemodes\Jumping.pwn(383) : error 001: expected token: ",", but found ";"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.