Hallo
Mein Pawno Crasht wegen diesem dreck
if(dialogid == DIALOG_REGSTEP_2)
{
new year, month,day;
new string[800];
getdate(year, month, day);
new DateInfo[3][20];
split(inputtext, DateInfo, '.');
if(response == 1)
{
if(german[playerid] == 1)
{
if (strlen(inputtext) > 10)
{
ShowPlayerDialog(playerid,DIALOG_REGSTEP_2,DIALOG_STYLE_INPUT,"Alter","ANGABEFEHLER: Wann bist du geboren?\nAngabe bitte in TT.MM.JJJJ","Weiter"," ");
return 0;
}
if (!IsValidDate(strval(DateInfo[0]),strval(DateInfo[1]),strval(DateInfo[2])))
{
ShowPlayerDialog(playerid,DIALOG_REGSTEP_2,DIALOG_STYLE_INPUT,"Alter","ANGABEFEHLER: Wann bist du geboren?\nAngabe bitte in TT.MM.JJJJ","Weiter"," ");
return 0;
}
if(year - strval(DateInfo[2]) > 100 || strval(DateInfo[2]) < 1 || strval(DateInfo[2]) >= year)
{
ShowPlayerDialog(playerid,DIALOG_REGSTEP_2,DIALOG_STYLE_INPUT,"Alter","ANGABEFEHLER:Wann bist du geboren?\nAngabe bitte in TT.MM.JJJJ","Weiter"," ");
return 0;
}
new check = year - strval(DateInfo[2]);
if(check == year)
{
ShowPlayerDialog(playerid,DIALOG_REGSTEP_2,DIALOG_STYLE_INPUT,"Alter","ANGABEFEHLER:Wann bist du geboren?\nAngabe bitte in TT.MM.JJJJ","Weiter"," ");
return 0;
}
if(strval(DateInfo[1]) > month)
{
check -= 1;
}
else if(strval(DateInfo[1]) == month && strval(DateInfo[0]) > day)
{
check -= 1;
}
pDaten[playerid][Alter] = check;
format(string, sizeof(string), "Ok, du bist also %d Jahre alt.",pDaten[playerid][Alter]);
SendClientMessage(playerid, COLOR_WHITE, string);
RegistrationStep[playerid] = 3;
ShowPlayerDialog(playerid,DIALOG_REGSTEP_3,DIALOG_STYLE_MSGBOX,"Fertig","Du hast dich erfolgreich Registriert und Wir wünschen dir viel Spaß","Weiter","-");
}
if(english[playerid] == 1)
{
if (strlen(inputtext) > 10)
{
ShowPlayerDialog(playerid,DIALOG_REGSTEP_2,DIALOG_STYLE_INPUT,"Age","ERROR INDICATION When were you born?\nPlease specify in dd.mm.yyyy","Submit"," ");
return 0;
}
if (!IsValidDate(strval(DateInfo[0]),strval(DateInfo[1]),strval(DateInfo[2])))
{
ShowPlayerDialog(playerid,DIALOG_REGSTEP_2,DIALOG_STYLE_INPUT,"Age","ERROR INDICATION When were you born?\nPlease specify in dd.mm.yyyy","Submit"," ");
return 0;
}
if(year - strval(DateInfo[2]) > 100 || strval(DateInfo[2]) < 1 || strval(DateInfo[2]) >= year)
{
ShowPlayerDialog(playerid,DIALOG_REGSTEP_2,DIALOG_STYLE_INPUT,"Age","ERROR INDICATION When were you born?\nPlease specify in dd.mm.yyyy","Submit"," ");
return 0;
}
new check = year - strval(DateInfo[2]);
if(check == year)
{
ShowPlayerDialog(playerid,DIALOG_REGSTEP_2,DIALOG_STYLE_INPUT,"Age","ERROR INDICATION When were you born?\nPlease specify in dd.mm.yyyy","Submit"," ");
return 0;
}
if(strval(DateInfo[1]) > month)
{
check -= 1;
}
else if(strval(DateInfo[1]) == month && strval(DateInfo[0]) > day)
{
check -= 1;
}
pDaten[playerid][Alter] = check;
format(string, sizeof(string), "Ok, so you're %d years old.",pDaten[playerid][Alter]);
SendClientMessage(playerid, COLOR_WHITE, string);
RegistrationStep[playerid] = 3;
ShowPlayerDialog(playerid,DIALOG_REGSTEP_3,DIALOG_STYLE_MSGBOX,"Finish","You have successfully registered and we wish you much fun","Submit","-");
}
}
if(response == 0)
{
if(german[playerid] == 1)
{
ShowPlayerDialog(playerid,DIALOG_REGSTEP_2,DIALOG_STYLE_INPUT,"Alter","ANGABEFEHLER:Wann bist du geboren?\nAngabe bitte in TT.MM.JJJJ","Weiter"," ");
}
if(english[playerid] == 1)
{
ShowPlayerDialog(playerid,DIALOG_REGSTEP_2,DIALOG_STYLE_INPUT"Age","ERROR INDICATION When were you born?\nPlease specify in dd.mm.yyyy","Submit"," ");
}
}
}
Was ist der fehler da?
Habe nur das und step1 und 3 auch noch reingemacht aber irgendwie Crasht das wenn das drine ist Also dieser code
-
-
Naja, welches Script hast du? GF edit?
liegt es genau daran? versuchs mal rauszukommentieren. -
Ja nach raus kommentieren ist das so C:\Program Files (x86)\Rockstar Games\server 0.3c\gamemodes\PsychosReallife.pwn(358 -- 359) : error 028: invalid subscript (not an array or too many subscripts): "dini_Exists"
C:\Program Files (x86)\Rockstar Games\server 0.3c\gamemodes\PsychosReallife.pwn(360) : warning 217: loose indentation
C:\Program Files (x86)\Rockstar Games\server 0.3c\gamemodes\PsychosReallife.pwn(363) : warning 217: loose indentation
C:\Program Files (x86)\Rockstar Games\server 0.3c\gamemodes\PsychosReallife.pwn(376 -- 377) : error 028: invalid subscript (not an array or too many subscripts): "dini_Exists"
C:\Program Files (x86)\Rockstar Games\server 0.3c\gamemodes\PsychosReallife.pwn(378) : warning 217: loose indentation
C:\Program Files (x86)\Rockstar Games\server 0.3c\gamemodes\PsychosReallife.pwn(382) : error 054: unmatched closing brace ("}")
C:\Program Files (x86)\Rockstar Games\server 0.3c\gamemodes\PsychosReallife.pwn(384) : error 010: invalid function or declaration
C:\Program Files (x86)\Rockstar Games\server 0.3c\gamemodes\PsychosReallife.pwn(386) : error 010: invalid function or declaration
C:\Program Files (x86)\Rockstar Games\server 0.3c\gamemodes\PsychosReallife.pwn(388) : error 010: invalid function or declaration
C:\Program Files (x86)\Rockstar Games\server 0.3c\gamemodes\PsychosReallife.pwn(393) : error 010: invalid function or declaration
C:\Program Files (x86)\Rockstar Games\server 0.3c\gamemodes\PsychosReallife.pwn(397) : error 010: invalid function or declaration
C:\Program Files (x86)\Rockstar Games\server 0.3c\gamemodes\PsychosReallife.pwn(400) : error 021: symbol already defined: "GetPlayerName"
C:\Program Files (x86)\Rockstar Games\server 0.3c\gamemodes\PsychosReallife.pwn(402) : error 010: invalid function or declaration
C:\Program Files (x86)\Rockstar Games\server 0.3c\gamemodes\PsychosReallife.pwn(404) : error 021: symbol already defined: "dini_Create"
C:\Program Files (x86)\Rockstar Games\server 0.3c\gamemodes\PsychosReallife.pwn(405) : error 021: symbol already defined: "dini_IntSet"
C:\Program Files (x86)\Rockstar Games\server 0.3c\gamemodes\PsychosReallife.pwn(405) : error 017: undefined symbol "inputtext"
C:\Program Files (x86)\Rockstar Games\server 0.3c\gamemodes\PsychosReallife.pwn(405) : error 010: invalid function or declaration
C:\Program Files (x86)\Rockstar Games\server 0.3c\gamemodes\PsychosReallife.pwn(405 -- 406) : fatal error 107: too many error messages on one line -
Zeig mal die Zeilen von 358-400
-
Okay hier 333 bis 418
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
//-----------Sprachen-----------
if(dialogid == Languesmenu)
{
if(!response)
{
english[playerid] = 1;
SendClientMessage(playerid,COLOR_GREEN,"[PsychoSys]You have choose English as your Language. Falsch? Mit /asprache oder /clanguage änderst du deine Sprache zu Deutsch.");
}
if(response)
{
if(listitem == 0) // deutsch
{
new msg[200];
new msg2[200];
GetPlayerName(playerid,pname,sizeof(pname));
format(msg,sizeof(msg),"Willkommen %s.\n\nDu kannst dich jetzt registrieren.\nGib bitte dein gewünschtes Passwort\nein.",pname);
format(msg2,sizeof(msg2),"Willkommen zurück %s.\n\nDu kannst dich jetzt einloggen.\nGib bitte dein Passwort ein.",pname);
german[playerid] = 1;
SendClientMessage(playerid,COLOR_GREEN,"[PsychoSys]Du hast Deutsch als deine Sprache gewählt. Wrong? Type /clanguage or /asprache to change your language.");
if(!dini_Exists(save))
{
ShowPlayerDialog(playerid, reg, DIALOG_STYLE_INPUT, "Registrierung:", msg, "Weiter", "Abbrechen");
}
else(dini_Exists(save))
{
ShowPlayerDialog(playerid, login, DIALOG_STYLE_INPUT, "Einloggen:", msg2, "Bestätigen", "Abbrechen");
}
}
if(listitem == 1) // englisch
{
new msg[200];
new msg2[200];
GetPlayerName(playerid,pname,sizeof(pname));
format(msg,sizeof(msg),"Welcome %s.\n\nYou can now register.\nType in your Password.",pname);
format(msg2,sizeof(msg2),"Welcome back %s.\n\nYou can now login.\nType in your Password.",pname);
english[playerid] = 1;
SendClientMessage(playerid,COLOR_GREEN,"[PsychoSys]You have choose English as your Language. Falsch? Mit /asprache oder /clanguage änderst du deine Sprache zu Deutsch.");
if(!dini_Exists(save))
{
ShowPlayerDialog(playerid, reg, DIALOG_STYLE_INPUT, "Registration:", msg, "Submit", "Cancel");
}
else(dini_Exists(save))
{
ShowPlayerDialog(playerid, login, DIALOG_STYLE_INPUT, "Login:", msg2, "Submit", "Cancel");
}
}
}
}
//--------------Login/register------------
if(dialogid == reg)
{
if(!response)
{
if(german[playerid] == 1)
{
SendClientMessage(playerid,COLOR_RED,"[PsychoSys]Die Registrieren wurde abgebrochen. Wenn du dich trotzdem registrieren willst,");
SendClientMessage(playerid,COLOR_RED,"verwende /register");
}
if(english[playerid] == 1)
{
SendClientMessage(playerid,COLOR_RED,"[PsychoSys]The Registration was canceled. If you want to register, type /register");
}
return 1;
}
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(save,sizeof(save),"/PsychosRealLife/Spieler/%s.ini",name);
if(!dini_Exists(save))
{
dini_Create(save);
dini_IntSet(save,"passwort",udb_hash(inputtext));
if(german[playerid] == 1)
{
ShowPlayerDialog(playerid,DIALOG_REGSTEP_1,DIALOG_STYLE_MSGBOX,"Geschlecht","Bist du Männlich oder Weiblich?","Männlich","Weiblich");
}
if(english[playerid] == 1)
{
ShowPlayerDialog(playerid,DIALOG_REGSTEP_1,DIALOG_STYLE_MSGBOX,"Gender","You are a Man or Woman","Male","Female");
}
loggedin[playerid] = true;
Login(playerid);
}
return 1;
}Habs geschaft Danke an alle
//close -
breadfish.de
Hat das Thema geschlossen.