23.04.2012, 20:00
quote=xx360;1817839]Try this
[/quote]
with i have 4 errors
C:\Users\user\Desktop\gamemode\gamemodes\1.pwn(275 6) : error 017: undefined symbol "string"
C:\Users\user\Desktop\gamemode\gamemodes\1.pwn(275 6) : error 017: undefined symbol "string"
C:\Users\user\Desktop\gamemode\gamemodes\1.pwn(275 6) : error 029: invalid expression, assumed zero
C:\Users\user\Desktop\gamemode\gamemodes\1.pwn(275 6) : fatal error 107: too many error messages on one line
line of error
PHP код:
forward LoginOrRegisterTimer();
public LoginOrRegisterTimer()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
format(string, sizeof(string), "%s.ini", PlayerName(i));
if(!dini_Exists(string))
{
gPlayerAccount[i] = 0;
new regstring[256];
new regname[64];
SendClientMessage(i, COLOR_YELLOW, "Ти нямаш акаунт. Моля, регистрирай твоя акаунт.");
GetPlayerName(i,regname,sizeof(regname));
format(regstring,sizeof(regstring),"{FFFFFF}[ B{80FF00}[ S]{FF0000}[0.3]\n{80FF00}Моля регистрирай твоя акаунт преди да се логнеш");
ShowPlayerDialog(i,12345,DIALOG_STYLE_PASSWORD,"Регистрация:",regstring,"Регистрирай","Излез");
return 1;
}
else
{
gPlayerAccount[i] = 0;
gPlayerAccount[i] = 1;
new loginstring[256];
new loginname[64];
SendClientMessage(i, COLOR_YELLOW, "SERVER: Това име е регистрирано.");
SendClientMessage(i, COLOR_WHITE, "HINT: Ти може да се логнеш като си въведеш паролата");
GetPlayerName(i,loginname,sizeof(loginname));
format(loginstring,sizeof(loginstring),"{FFFFFF}[ B{80FF00}[ S-{FF0000}[0.3]\n{80FF00}Името е регистрирано. Моля, въведи твоята парола");
ShowPlayerDialog(i,12346,DIALOG_STYLE_PASSWORD,"Влизане:",loginstring,"Влез","Излез");
return 1;
}
}
}
return 1;
}
with i have 4 errors
C:\Users\user\Desktop\gamemode\gamemodes\1.pwn(275 6) : error 017: undefined symbol "string"
C:\Users\user\Desktop\gamemode\gamemodes\1.pwn(275 6) : error 017: undefined symbol "string"
C:\Users\user\Desktop\gamemode\gamemodes\1.pwn(275 6) : error 029: invalid expression, assumed zero
C:\Users\user\Desktop\gamemode\gamemodes\1.pwn(275 6) : fatal error 107: too many error messages on one line
line of error
PHP код:
format(string, sizeof(string), "%s.ini", PlayerName(playerid));