format(string, sizeof(string), "{FFFFFF}Welcome back {00FF00}%s{FFFFFF}! \n\nThis account is registered. \nInsert your password to {00FF00}login {FFFFFF}to your account.\n\n{FFFFFF}Current time:{FF8000} %02d:%02d\t\t\t{FFFFFF}Times Logged:{FF8000} %d\n{FFFFFF}Date:{FF8000} %02d/%02d/%d\t\t\t{FFFFFF}Failed Attempts:{FF0000} 0/3\n{FFFFFF}Players in city: {FF8000}%d\t\t\t{FFFFFF}Last Login:{FF8000} %02d/%02d/%d",name,hour,minute,pInfo[playerid][Logins],day,month,year,Iter_Count(Player),pInfo[playerid][LastLoginD],pInfo[playerid][LastLoginM],pInfo[playerid][LastLoginY]);
ShowPlayerDialog(playerid,dlogin,DIALOG_STYLE_INPUT,"{FF8000}TEST",string,"Login","Quit");
public OnPlayerConnect(playerid)
{
new hour, minute, second, string[500], year, month, day;
getdate(year, month, day);
gettime(hour, minute, second);
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
//format(string,sizeof(string),"Last Login: %02d/%02d/%d",pInfo[playerid][LastLoginD],pInfo[playerid][LastLoginM],pInfo[playerid][LastLoginY]);
//SendClientMessage(playerid, -1, string);
if(fexist(Path(playerid)))
{
INI_ParseFile(Path(playerid),"loadaccount_%s", .bExtra = true, .extra = playerid);
format(string, sizeof(string), "{FFFFFF}Welcome back {00FF00}%s{FFFFFF}! \n\nThis account is registered. \nInsert your password to {00FF00}login {FFFFFF}to your account.\n\n{FFFFFF}Current time:{FF8000} %02d:%02d\t\t\t{FFFFFF}Times Logged:{FF8000} %d\n{FFFFFF}Date:{FF8000} %02d/%02d/%d\t\t\t{FFFFFF}Failed Attempts:{FF0000} 0/3\n{FFFFFF}Players in city: {FF8000}%d\t\t\t{FFFFFF}Last Login:{FF8000} %02d/%02d/%d",name,hour,minute,pInfo[playerid][Logins],day,month,year,Iter_Count(Player),pInfo[playerid][LastLoginD],pInfo[playerid][LastLoginM],pInfo[playerid][LastLoginY]);
ShowPlayerDialog(playerid,dlogin,DIALOG_STYLE_INPUT,"{FF8000} TEST",string,"Login","Quit"); // 23 spaces
}
else
{
format(string, sizeof(string), "{FFFFFF}Welcome to {FF8000}TEST {00FF00}%s{FFFFFF}! \n\nIf you want to join us, go and make your first step into\n{FF8000}TEST{FFFFFF} and {00FF00}register{FFFFFF} your account\nwith typing the password into box below.",name);
ShowPlayerDialog(playerid,dregister,DIALOG_STYLE_INPUT,"{FF8000} TEST ",string,"Register","Quit"); // 22 spaces
return 1;
}
return 1;
}
There are many solutions:
1) Make it shorter. 2) Use multiple lines. 3) Use a different compiler. 4) Use multiple formats. |