30.11.2016, 11:45
Код:
Thien.pwn(138) : error 017: undefined symbol "PlayerInfo" Thien.pwn(139) : error 017: undefined symbol "PlayerInfo" Thien.pwn(140) : error 017: undefined symbol "PlayerInfo" Thien.pwn(317) : error 028: invalid subscript (not an array or too many subscripts): "udb_hash" Thien.pwn(317) : warning 215: expression has no effect Thien.pwn(317) : error 001: expected token: ";", but found "]" Thien.pwn(317) : error 029: invalid expression, assumed zero Thien.pwn(317) : fatal error 107: too many error messages on one line
Код:
public OnPlayerDisconnect(playerid, reason)
{
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File, "data");
INI_WriteInt(File, "Tien",GetPlayerMoney(playerid));
INI_WriteInt(File, "Admin",PlayerInfo[playerid][pAdmin]);
INI_WriteInt(File, "Diem",PlayerInfo[playerid][pDiem]);
INI_WriteInt(File, "Vip", PlayerInfo[playerid][pVip]);
INI_Close(File);
return 1;
}
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case DIALOG_DANGKY:
{
if(!response) return Kick(playerid);
if(response)
{
if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_DANGKY, DIALOG_STYLE_INPUT,"Dang Ky","Mat Khau Dang Ky Khong Hop Le, Hay Thu Cai Khac!","Dang Ky","Thoat");
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File, "data");
INI_WriteInt(File, "Password",udb_hash[inputtext]);
INI_WriteInt(File, "Tien",0);
INI_WriteInt(File, "Admin",0);
INI_WriteInt(File, "Diem",0);
INI_WriteInt(File, "Vip",0);
INI_Close(File);
}
}
case DIALOG_DANGNHAP:
{
if(!response) return Kick(playerid);
if(response)
{
if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
{
INI_ParseFile(UserPath(playerid),"LoadUser_%s",.bExtra = true,.extra = playerid);
GivePlayerMoney(playerid,PlayerInfo[playerid][pTien]);
SetPlayerScore(playerid,PlayerInfo[playerid][pDiem]);
SendClientMessage(playerid,COLOR_YELLOW,"Dang Nhap Thanh Cong!");
SpawnPlayer(playerid);
TogglePlayerSpectating(playerid, 0);
}
else
{
TogglePlayerSpectating(playerid, 1);
ShowPlayerDialog(playerid,DIALOG_DANGNHAP,DIALOG_STYLE_PASSWORD,"Dang Nhap","Sai Mat Khau Vui Long Nhap Dung","Dang Nhap","Thoat");
}
}
}
}
return 1;
}
Код:
enum pInfo
{
pPass,
pTien,
pAdmin,
pDiem,
pVip
}
new PlayerInfo[MAX_PLAYERS][pInfo];



so how can i solve this problem