Tag
Kriege ständig den Error beim Compilen (310) : error 030: compound statement not closed at the end of file (started at line 265)
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == Dialog_Login)
{
if(!response) return Kick(playerid);
if(!strlen(inputtext))
{
ShowPlayerDialog(playerid,Dialog_Login,DIALOG_STYLE_INPUT,"Login","Logge dich bitte mit deinem Passwort ein","Login","Disconnect");//dialog zum Einloggen
return SendClientMessage(playerid,rot,"Du hast kein Passwort eingegeben.");
}
new string[128],name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof name);
format(string,sizeof string,"Accounts/%s.user",name);
if(!strcmp(dini_Get(string,"Passwort"),inputtext,true))
{
SetPVarInt(playerid,"Adminlevel",dini_Int(string,"Adminlevel"));
SetPVarInt(playerid,"Premium",dini_Int(string,"Premium"));
SetPVarInt(playerid,"Geld",dini_Int(string,"Geld"));
SetPVarInt(playerid,"Kills",dini_Int(string,"Kills"));
}
else //wenn das passwort falsch eingegeben wurde
{
ShowPlayerDialog(playerid,Dialog_Login,DIALOG_STYLE_INPUT,"Login","Logge dich bitte mit deinem Passwort ein","Login","Disconnect");//dialog zum Einloggen
return SendClientMessage(playerid,rot,"Du hast dein Passwort falsch eingegeben.");
}
}
//nun den register dialog
if(dialogid == Dialog_Reg)
{
if(!response) return Kick(playerid); //siehe bei Dialog_Login
if(!strlen(inputtext))//siehe oben
{
ShowPlayerDialog(playerid,Dialog_Reg,DIALOG_STYLE_INPUT,"Registration","Bitte gebe dein Passwort zur Registrierung ein","Register","Disconnect");//dialog zum registrieren
return SendClientMessage(playerid,rot,"Du hast kein Passwort eingegeben.");
}
new name[MAX_PLAYER_NAME],accFormat[128];
GetPlayerName(playerid,name,sizeof name);
format(accFormat,sizeof accFormat,"Accounts/%s.user",name);
dini_Create(accFormat);
SetPVarString(playerid,"Passwort",inputtext);
dini_Set(accFormat,"Passwort",inputtext);
SetPVarInt(playerid,"Adminlevel",0);
SetPVarInt(playerid,"Premium",0);
SetPVarInt(playerid,"Geld",0);
SetPVarInt(playerid,"Kills",0);
return 1;
}