18.07.2016, 08:41
(
Последний раз редактировалось Dejan12345; 18.07.2016 в 10:12.
)
[/pawn] public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new pname[MAX_PLAYER_NAME], path[200];
GetPlayerName(playerid, pname, sizeof(pname));
format(path, sizeof(path), "/spieler/%s.ini", pname);
switch(dialogid)
{
case DIALOG_REGISTER1:
{
if(!response)
{
Kick(playerid);
}
else
{
new pwlength = strlen(inputtext);
if(pwlength > 0)
{
dini_Create(path); /i
dini_Set(path, "password", inputtext);
ShowPlayerDialog(playerid, DIALOG_REGISTER2, DIALOG_STYLE_LIST, "male\r\female", "OK", "Cancel");
}
else
{
ShowPlayerDialog(playerid, DIALOG_NOPW1, DIALOG_STYLE_MSGBOX, "Register", "You have to enter a password!", "OK", "Cancel");
}
}
}
case DIALOG_REGISTER2:
{
if(!response)
{
dini_Remove(path);
Kick(playerid);
}
else
{
dini_IntSet(path, "sex", listitem);
ShowPlayerDialog(playerid, DIALOG_REGISTER3, DIALOG_STYLE_INPUT, "Register", "Your Age?", "OK", "Cancel");
}
}
case DIALOG_REGISTER3:
{
if(!response)
{
dini_Remove(path);
Kick(playerid);
}
else
{
dini_Set(path, "age", inputtext);
ShowPlayerDialog(playerid, DIALOG_REGISTER4, DIALOG_STYLE_MSGBOX, "Register", "Your Register is complete!", "OK", "OK");
}
}
case DIALOG_REGISTER4:
{
pInfo[playerid][sex] = dini_Int(path, "sex");
pInfo[playerid][age] = dini_Int(path, "age");
pInfo[playerid][logged] = 1;
}
case DIALOG_LOGIN1:
{
if(!response)
{
Kick(playerid);
}
else
{
new pwlength = strlen(inputtext);
if(pwlength > 0)
{
new pw[200];
format(pw, sizeof(pw), "%s", dini_Get(path, "password");
if(strcmp(inputtext, pw) == 0)
{
pInfo[playerid][sex] = dini_Int(path, "sex");
pInfo[playerid][age] = dini_Int(path, "age");
pInfo[playerid][logged] = 1;
}
else
{
ShowPlayerDialog(playerid, DIALOG_WRONGPW, DIALOG_STYLE_MSGBOX, "Login", "Wrong Password!", "OK", "Cancel");
}
}
else
{
ShowPlayerDialog(playerid, DIALOG_NOPW2, DIALOG_STYLE_MSGBOX, "Login", "SYou have to enter a password!", "OK", "Cancel");
}
}
}
case DIALOG_NOPW1:
{
if(!response)
{
Kick(playerid);
}
else
{
ShowPlayerDialog(playerid, DIALOG_REGISTER1, DIALOG_STYLE_INPUT, "Register", "Your Password", "OK", "Cancel");
}
}
case DIALOG_NOPW2:
{
if(!response)
{
Kick(playerid);
}
else
{
ShowPlayerDialog(playerid, DIALOG_LOGIN1, DIALOG_STYLE_INPUT, "Login", "Your Password:", "OK", "Abbrechen");
}
}
case DIALOG_WRONGPW:
{
if(!response)
{
Kick(playerid);
}
else
{
ShowPlayerDialog(playerid, DIALOG_LOGIN1, DIALOG_STYLE_INPUT, "Login", "Your Password:", "OK", "Cancel");
}
}
}
return 1;
} [/pawn]
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\pawno\Y_INI.pwn(265) : error 017: undefined symbol "DIALOG_REGISTER1"
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\pawno\Y_INI.pwn(276) : error 029: invalid expression, assumed zero
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\pawno\Y_INI.pwn(276) : error 017: undefined symbol "i"
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\pawno\Y_INI.pwn(27 : error 017: undefined symbol "DIALOG_REGISTER2"
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\pawno\Y_INI.pwn(282) : error 017: undefined symbol "DIALOG_NOPW1"
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\pawno\Y_INI.pwn(286) : error 017: undefined symbol "DIALOG_REGISTER2"
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\pawno\Y_INI.pwn(296) : error 017: undefined symbol "DIALOG_REGISTER3"
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\pawno\Y_INI.pwn(299) : error 017: undefined symbol "DIALOG_REGISTER3"
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\pawno\Y_INI.pwn(309) : error 017: undefined symbol "DIALOG_REGISTER4"
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\pawno\Y_INI.pwn(312) : error 017: undefined symbol "DIALOG_REGISTER4"
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\pawno\Y_INI.pwn(314) : error 017: undefined symbol "pInfo"
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\pawno\Y_INI.pwn(314) : warning 215: expression has no effect
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\pawno\Y_INI.pwn(314) : error 001: expected token: ";", but found "]"
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\pawno\Y_INI.pwn(314) : error 029: invalid expression, assumed zero
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\pawno\Y_INI.pwn(314) : fatal error 107: too many error messages on one line
help please
{
new pname[MAX_PLAYER_NAME], path[200];
GetPlayerName(playerid, pname, sizeof(pname));
format(path, sizeof(path), "/spieler/%s.ini", pname);
switch(dialogid)
{
case DIALOG_REGISTER1:
{
if(!response)
{
Kick(playerid);
}
else
{
new pwlength = strlen(inputtext);
if(pwlength > 0)
{
dini_Create(path); /i
dini_Set(path, "password", inputtext);
ShowPlayerDialog(playerid, DIALOG_REGISTER2, DIALOG_STYLE_LIST, "male\r\female", "OK", "Cancel");
}
else
{
ShowPlayerDialog(playerid, DIALOG_NOPW1, DIALOG_STYLE_MSGBOX, "Register", "You have to enter a password!", "OK", "Cancel");
}
}
}
case DIALOG_REGISTER2:
{
if(!response)
{
dini_Remove(path);
Kick(playerid);
}
else
{
dini_IntSet(path, "sex", listitem);
ShowPlayerDialog(playerid, DIALOG_REGISTER3, DIALOG_STYLE_INPUT, "Register", "Your Age?", "OK", "Cancel");
}
}
case DIALOG_REGISTER3:
{
if(!response)
{
dini_Remove(path);
Kick(playerid);
}
else
{
dini_Set(path, "age", inputtext);
ShowPlayerDialog(playerid, DIALOG_REGISTER4, DIALOG_STYLE_MSGBOX, "Register", "Your Register is complete!", "OK", "OK");
}
}
case DIALOG_REGISTER4:
{
pInfo[playerid][sex] = dini_Int(path, "sex");
pInfo[playerid][age] = dini_Int(path, "age");
pInfo[playerid][logged] = 1;
}
case DIALOG_LOGIN1:
{
if(!response)
{
Kick(playerid);
}
else
{
new pwlength = strlen(inputtext);
if(pwlength > 0)
{
new pw[200];
format(pw, sizeof(pw), "%s", dini_Get(path, "password");
if(strcmp(inputtext, pw) == 0)
{
pInfo[playerid][sex] = dini_Int(path, "sex");
pInfo[playerid][age] = dini_Int(path, "age");
pInfo[playerid][logged] = 1;
}
else
{
ShowPlayerDialog(playerid, DIALOG_WRONGPW, DIALOG_STYLE_MSGBOX, "Login", "Wrong Password!", "OK", "Cancel");
}
}
else
{
ShowPlayerDialog(playerid, DIALOG_NOPW2, DIALOG_STYLE_MSGBOX, "Login", "SYou have to enter a password!", "OK", "Cancel");
}
}
}
case DIALOG_NOPW1:
{
if(!response)
{
Kick(playerid);
}
else
{
ShowPlayerDialog(playerid, DIALOG_REGISTER1, DIALOG_STYLE_INPUT, "Register", "Your Password", "OK", "Cancel");
}
}
case DIALOG_NOPW2:
{
if(!response)
{
Kick(playerid);
}
else
{
ShowPlayerDialog(playerid, DIALOG_LOGIN1, DIALOG_STYLE_INPUT, "Login", "Your Password:", "OK", "Abbrechen");
}
}
case DIALOG_WRONGPW:
{
if(!response)
{
Kick(playerid);
}
else
{
ShowPlayerDialog(playerid, DIALOG_LOGIN1, DIALOG_STYLE_INPUT, "Login", "Your Password:", "OK", "Cancel");
}
}
}
return 1;
} [/pawn]
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\pawno\Y_INI.pwn(265) : error 017: undefined symbol "DIALOG_REGISTER1"
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\pawno\Y_INI.pwn(276) : error 029: invalid expression, assumed zero
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\pawno\Y_INI.pwn(276) : error 017: undefined symbol "i"
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\pawno\Y_INI.pwn(27 : error 017: undefined symbol "DIALOG_REGISTER2"
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\pawno\Y_INI.pwn(282) : error 017: undefined symbol "DIALOG_NOPW1"
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\pawno\Y_INI.pwn(286) : error 017: undefined symbol "DIALOG_REGISTER2"
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\pawno\Y_INI.pwn(296) : error 017: undefined symbol "DIALOG_REGISTER3"
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\pawno\Y_INI.pwn(299) : error 017: undefined symbol "DIALOG_REGISTER3"
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\pawno\Y_INI.pwn(309) : error 017: undefined symbol "DIALOG_REGISTER4"
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\pawno\Y_INI.pwn(312) : error 017: undefined symbol "DIALOG_REGISTER4"
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\pawno\Y_INI.pwn(314) : error 017: undefined symbol "pInfo"
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\pawno\Y_INI.pwn(314) : warning 215: expression has no effect
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\pawno\Y_INI.pwn(314) : error 001: expected token: ";", but found "]"
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\pawno\Y_INI.pwn(314) : error 029: invalid expression, assumed zero
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\pawno\Y_INI.pwn(314) : fatal error 107: too many error messages on one line
help please