[Tutorial] eG | Creating a Login/Register Dialog
#1

- To be updated
Reply
#2

Thankyou
Reply
#3

I got the following errors;
pawn Код:
error 001: expected token: ";", but found "-identifier-"
.pwn(163) : error 017: undefined symbol "pName"
.pwn(163) : error 017: undefined symbol "pName"
.pwn(163) : error 029: invalid expression, assumed zero
.pwn(163) : fatal error 107: too many error messages on one line
Fix for this?
Reply
#4

WHY DINI?? Old, and outdated. There are newer, faster systems!!
Reply
#5

Quote:
Originally Posted by Parrot
Посмотреть сообщение
I got the following errors;
pawn Код:
error 001: expected token: ";", but found "-identifier-"
.pwn(163) : error 017: undefined symbol "pName"
.pwn(163) : error 017: undefined symbol "pName"
.pwn(163) : error 029: invalid expression, assumed zero
.pwn(163) : fatal error 107: too many error messages on one line
Fix for this?
Add new pName[24]; at the top of your script.

And what line is the identifier error on?
Reply
#6

You're creating the string 'PlayerName' but always use 'pName', hence why people get those errors.
Reply
#7

Thanks, but now I got these errors (given you errors, lines, possible questions below);
pawn Код:
.pwn(25) : error 001: expected token: ";", but found "new"
.pwn(125) : error 027: invalid character constant
.pwn(125) : error 027: invalid character constant
.pwn(453) : error 027: invalid character constant
.pwn(453) : error 027: invalid character constant
.pwn(463) : error 027: invalid character constant
.pwn(463) : error 027: invalid character constant
.pwn(521) : warning 203: symbol is never used: "PlayerName"

Line 25-x (and below since I think it's not this new which is troubling the script):
new engine,lights,alarm,doors,bonnet,boot,objective;//This will create the engine/lights,etc varibles
new File[128]; // for register/login system
new Message[128]; // for register/login system
new PlayerName[24]; // for register/login system
new IsLogged[MAX_PLAYERS]; // for register/login system
new pName[24];

Line 125:
format(Message, sizeof(Message), "Welcome back %s,\n\Please enter your password to login!", pName);
Line 453:
format(Message, sizeof(Message), "Welcome back %s,\n\Please enter your password to login!", pName);
Line 463:
format(Message, sizeof(Message), "Welcome back %s,\n\Please enter your password to login!", pName);
Line 521:
//nothing here, should I remove the new in the top of the script: "new PlayerName[24]; // for register/login system"
Reply
#8

Quote:
Originally Posted by iRemix
Посмотреть сообщение
pawn Код:
/*     OnPlayerConnect     */
public OnPlayerConnect(playerid)
{
       /* Getting the players name */
       GetPlayerName(playerid, pName, sizeof(pName));
       /* Formatting the location of the file. */
       format(File, sizeof(File), FileLocation, pName);
       /* Checking if accounts exists. In this case it doesnt, so were going to show the register dialog */
       if(!dini_Exists(File))
       {
           format(Message, sizeof(Message), "Welcome %s,\n\nYou are new here please enter a new password to register!", pName);
           ShowPlayerDialog(playerid, DIALOG_REG, DIALOG_STYLE_INPUT, "Account | Register", Message, "Register", "Leave");
       }
       /* Checking if accounts exists. In this case it does, so were going to show the login dialog */
       if(dini_Exists(File))
       {
           format(Message, sizeof(Message), "Welcome back %s,\n\Please enter your password to login!", pName);
           ShowPlayerDialog(playerid, DIALOG_LOG, DIALOG_STYLE_INPUT, "Account | Login", Message, "Login", "Leave");
       }
       return 1;
}
I don't see any
pawn Код:
new Message[70];
anywhere..
Reply
#9

Firstly, you're still using Dini ( Its outdated. ).
Lastly, you're just giving people codes and not explaining what they really do at parts.
Reply
#10

pot sa intru si io in clan?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)