Error while compiling[rep+]
#1

[/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
Reply
#2

You need to define those dialogs e.g #define DIALOG_REGISTER
And use [CODE] not [pawn]..
Reply
#3

i define it
Код:
 #if defined FILTERSCRIPT
#define DIALOG_REGISTER1 0
#define DIALOG_REGISTER2 1
#define DIALOG_REGISTER3 2
#define DIALOG_REGISTER4 3
#define DIALOG_LOGIN1 4
#define DIALOG_NOPW1 5
#define DIALOG_NOPW2 6
#define DIALOG_WRONGPW 7
Reply
#4

Yes you define it like that.You could also use id's instead for some random dialog so you dont need to define everything.
Reply
#5

bro now 4 errors help i only add code C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\pawno\Strcamp.pwn(9 : error 017: undefined symbol "pInfo"
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\pawno\Strcamp.pwn(9 : warning 215: expression has no effect
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\pawno\Strcamp.pwn(9 : error 001: expected token: ";", but found "]"
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\pawno\Strcamp.pwn(9 : error 029: invalid expression, assumed zero
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\pawno\Strcamp.pwn(9 : fatal error 107: too many error messages on one line
Reply
#6

can you send line 98 ?
Reply
#7

dini_IntSet(path, "sex", pInfo[playerid][sex]);
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)