can any help me with register -
Dejan12345 - 27.07.2016
Код:
error 029: invalid expression, assumed zero
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\gamemodes\BARP.pwn(792) : error 017: undefined symbol "i"
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\gamemodes\BARP.pwn(794) : error 027: invalid character constant
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\gamemodes\BARP.pwn(794) : error 027: invalid character constant
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\gamemodes\BARP.pwn(846) : error 001: expected token: ",", but found ";"
Код:
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, "Musko\r\Zensko", "OK", "Otkazi");
}
else
{
ShowPlayerDialog(playerid, DIALOG_NOPW1, DIALOG_STYLE_MSGBOX, "Registracija", "Moras uneti loziku!", "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, "Registracija", "Tvoje godine ?", "OK", "Otkazi");
}
}
case DIALOG_REGISTER3:
{
if(!response)
{
dini_Remove(path);
Kick(playerid);
}
else
{
dini_Set(path, "age", inputtext);
ShowPlayerDialog(playerid, DIALOG_REGISTER4, DIALOG_STYLE_MSGBOX, "Registracija", "Tvoja registracija je gotova!", "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, "Prijava", "Pogresna Lozinka!", "OK", "Otkazi");
}
}
else
{
ShowPlayerDialog(playerid, DIALOG_NOPW2, DIALOG_STYLE_MSGBOX, "Prijava", "Moras da ukucas lozinku!", "OK", "Otkazi");
}
}
}
case DIALOG_NOPW1:
{
if(!response)
{
Kick(playerid);
}
else
{
ShowPlayerDialog(playerid, DIALOG_REGISTER1, DIALOG_STYLE_INPUT, "Registracija", "Tvoja lozinka", "OK", "Otkazi");
}
}
case DIALOG_NOPW2:
{
if(!response)
{
Kick(playerid);
}
else
{
ShowPlayerDialog(playerid, DIALOG_LOGIN1, DIALOG_STYLE_INPUT, "Prijava", "Tvoja lozinka:", "OK", "Otkazi");
}
}
case DIALOG_WRONGPW:
{
if(!response)
{
Kick(playerid);
}
else
{
ShowPlayerDialog(playerid, DIALOG_LOGIN1, DIALOG_STYLE_INPUT, "Prijava", "Tvoja Lozinka:", "OK", "Otkazi");
}
}
}
return 1;
}
help
Re: can any help me with register - Quinncell - 27.07.2016
Why are you using d_ini?
Did I not provide a good y_ini tutorial for you in one of your threads?
Re: can any help me with register -
DarkSkull - 27.07.2016
PHP код:
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);
dini_Set(path, "password", inputtext);
ShowPlayerDialog(playerid, DIALOG_REGISTER2, DIALOG_STYLE_LIST, "Musko\r\Zensko", "OK", "Otkazi");
}
else
{
ShowPlayerDialog(playerid, DIALOG_NOPW1, DIALOG_STYLE_MSGBOX, "Registracija", "Moras uneti loziku!", "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, "Registracija", "Tvoje godine ?", "OK", "Otkazi");
}
}
case DIALOG_REGISTER3:
{
if(!response)
{
dini_Remove(path);
Kick(playerid);
}
else
{
dini_Set(path, "age", inputtext);
ShowPlayerDialog(playerid, DIALOG_REGISTER4, DIALOG_STYLE_MSGBOX, "Registracija", "Tvoja registracija je gotova!", "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, "Prijava", "Pogresna Lozinka!", "OK", "Otkazi");
}
}
else
{
ShowPlayerDialog(playerid, DIALOG_NOPW2, DIALOG_STYLE_MSGBOX, "Prijava", "Moras da ukucas lozinku!", "OK", "Otkazi");
}
}
}
case DIALOG_NOPW1:
{
if(!response)
{
Kick(playerid);
}
else
{
ShowPlayerDialog(playerid, DIALOG_REGISTER1, DIALOG_STYLE_INPUT, "Registracija", "Tvoja lozinka", "OK", "Otkazi");
}
}
case DIALOG_NOPW2:
{
if(!response)
{
Kick(playerid);
}
else
{
ShowPlayerDialog(playerid, DIALOG_LOGIN1, DIALOG_STYLE_INPUT, "Prijava", "Tvoja lozinka:", "OK", "Otkazi");
}
}
case DIALOG_WRONGPW:
{
if(!response)
{
Kick(playerid);
}
else
{
ShowPlayerDialog(playerid, DIALOG_LOGIN1, DIALOG_STYLE_INPUT, "Prijava", "Tvoja Lozinka:", "OK", "Otkazi");
}
}
}
return 1;
}
Try this.
Could you show Line 846?
Re: can any help me with register -
Dejan12345 - 27.07.2016
dont have line 846 now 3 errors bro
Код:
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\gamemodes\BARP.pwn(463) : error 027: invalid character constant
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\gamemodes\BARP.pwn(463) : error 027: invalid character constant
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\gamemodes\BARP.pwn(515) : error 001: expected token: ",", but found ";"
Re: can any help me with register -
DarkSkull - 27.07.2016
Show Line 515.
Re: can any help me with register -
DarkSkull - 27.07.2016
PHP код:
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);
dini_Set(path, "password", inputtext);
ShowPlayerDialog(playerid, DIALOG_REGISTER2, DIALOG_STYLE_LIST, "Musko \nZensko", "OK", "Otkazi");
}
else
{
ShowPlayerDialog(playerid, DIALOG_NOPW1, DIALOG_STYLE_MSGBOX, "Registracija", "Moras uneti loziku!", "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, "Registracija", "Tvoje godine ?", "OK", "Otkazi");
}
}
case DIALOG_REGISTER3:
{
if(!response)
{
dini_Remove(path);
Kick(playerid);
}
else
{
dini_Set(path, "age", inputtext);
ShowPlayerDialog(playerid, DIALOG_REGISTER4, DIALOG_STYLE_MSGBOX, "Registracija", "Tvoja registracija je gotova!", "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, "Prijava", "Pogresna Lozinka!", "OK", "Otkazi");
}
}
else
{
ShowPlayerDialog(playerid, DIALOG_NOPW2, DIALOG_STYLE_MSGBOX, "Prijava", "Moras da ukucas lozinku!", "OK", "Otkazi");
}
}
}
case DIALOG_NOPW1:
{
if(!response)
{
Kick(playerid);
}
else
{
ShowPlayerDialog(playerid, DIALOG_REGISTER1, DIALOG_STYLE_INPUT, "Registracija", "Tvoja lozinka", "OK", "Otkazi");
}
}
case DIALOG_NOPW2:
{
if(!response)
{
Kick(playerid);
}
else
{
ShowPlayerDialog(playerid, DIALOG_LOGIN1, DIALOG_STYLE_INPUT, "Prijava", "Tvoja lozinka:", "OK", "Otkazi");
}
}
case DIALOG_WRONGPW:
{
if(!response)
{
Kick(playerid);
}
else
{
ShowPlayerDialog(playerid, DIALOG_LOGIN1, DIALOG_STYLE_INPUT, "Prijava", "Tvoja Lozinka:", "OK", "Otkazi");
}
}
}
return 1;
}
\r is not a character constant. I think you tried to insert a new line. Use this code, It should work
Re: can any help me with register -
Dejan12345 - 27.07.2016
bro now error C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\gamemodes\BARP.pwn(515) : error 001: expected token: ",", but found ";" help line 515
Код:
format(pw, sizeof(pw), "%s", dini_Get(path, "password");
Re: can any help me with register -
Zeus666 - 27.07.2016
stop using bro
and read
expected ,
found ;
Change ; with ,
Re: can any help me with register -
DarkSkull - 27.07.2016
PHP код:
format(pw, sizeof(pw), "%s", dini_Get(path, "password"));
You missed a bracket. This should fix it
Quote:
Originally Posted by Zeus666
stop using bro
and read
expected ,
found ;
Change ; with ,
|
Seriously? -.-
Re: can any help me with register -
Dejan12345 - 27.07.2016
only undefined simbol pw