SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Tutorials

Reply
 
Thread Tools Display Modes
Old 31/07/2011, 10:56 AM   #11
Tony213
Little Clucker
 
Join Date: Jul 2010
Posts: 8
Reputation: 1
Default Re: Login and Register System - Dialogs - Using Y_INI

Wow really nice... ima go and try to learn this y_ini
Tony213 is offline   Reply With Quote
Old 01/08/2011, 12:10 AM   #12
Jack_Leslie
High-roller
 
Jack_Leslie's Avatar
 
Join Date: Feb 2011
Location: Australia
Posts: 1,216
Reputation: 98
Default Re: Login and Register System - Dialogs - Using Y_INI

Finally a decent y_ini tutorial, keep up the good work!
__________________
lol
Jack_Leslie is offline   Reply With Quote
Old 01/08/2011, 12:21 AM   #13
Kush
Gangsta
 
Join Date: May 2011
Posts: 785
Reputation: 123
Default Re: Login and Register System - Dialogs - Using Y_INI

Quote:
Originally Posted by Jack_Leslie View Post
Finally a decent y_ini tutorial, keep up the good work!
Thanks!
__________________
Quote:
Originally Posted by Dripac
i have more reputation than you, that means i am more clever than you my friend
Kush is offline   Reply With Quote
Old 01/08/2011, 01:16 PM   #14
963852741
Big Clucker
 
Join Date: Jul 2011
Posts: 62
Reputation: 2
Default Re: Login and Register System - Dialogs - Using Y_INI

Yay, I am using it (also edited)
thanks, Kush
963852741 is offline   Reply With Quote
Old 01/08/2011, 02:12 PM   #15
Dan.
Gangsta
 
Dan.'s Avatar
 
Join Date: Jul 2011
Location: Estonia
Posts: 501
Reputation: 52
Default Re: Login and Register System - Dialogs - Using Y_INI

Huh, hello again Kush, I keep having problems with your REGISTER/LOGIN scripts, take a look at this:

Code:
(242) : error 017: undefined symbol "UserPath"
(244) : error 017: undefined symbol "UserPath"
(245) : error 017: undefined symbol "DIALOG_LOGIN"
(245) : warning 215: expression has no effect
(245) : error 001: expected token: ";", but found "-string-"
(245) : warning 215: expression has no effect
(245) : error 001: expected token: "-string end-", but found "-identifier-"
(245) : fatal error 107: too many error messages on one line

And here are the lines:

Code:
 public OnPlayerConnect(playerid)
{
    if(fexist(UserPath(playerid))) // 242
    {
        INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid); // 244
       ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"Type your password below to login.","Login","Quit"); //245
    }
    else
    {
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_WHITE"Registering...",""COL_WHITE"Type your password below to register a new account.","Register","Quit");
    }
    return 1;
}

I guess the errors are because DIALOG_LOGIN and UserPath are not defined, but take a look at this:

Code:
 // Register system things
#define DIALOG_REGISTER 1
#define DIALOG_LOGIN 2
#define DIALOG_SUCCESS_1 3
#define DIALOG_SUCCESS_2 4

#define UserPath "/Users/%s.ini"

The #define UserPath was "PATH" before.. changed it but still the same thing, so maybe you could help. And dont offer me your pastebin version, not going to copy my whole script into there, so some help, please.
Dan. is offline   Reply With Quote
Old 01/08/2011, 03:07 PM   #16
Snowman12
Huge Clucker
 
Join Date: Jan 2011
Location: Nottingham, UK.
Posts: 450
Reputation: 23
Default Re: Login and Register System - Dialogs - Using Y_INI

Nice tutorial but i dont know if i missed anything but when the player registers he can play once logged in but when he goes t login a second time the password come up wrong time and time again can you help?

Thanks
Snowman12 is offline   Reply With Quote
Old 01/08/2011, 05:35 PM   #17
Shockey HD
Gangsta
 
Shockey HD's Avatar
 
Join Date: Jul 2011
Posts: 684
Reputation: 14
Default Re: Login and Register System - Dialogs - Using Y_INI

Quote:
Originally Posted by Snowman12 View Post
Nice tutorial but i dont know if i missed anything but when the player registers he can play once logged in but when he goes t login a second time the password come up wrong time and time again can you help?

Thanks
Are you sure you have your scriptfile correctly?
__________________
Shockey HD is offline   Reply With Quote
Old 01/08/2011, 05:39 PM   #18
Shockey HD
Gangsta
 
Shockey HD's Avatar
 
Join Date: Jul 2011
Posts: 684
Reputation: 14
Default Re: Login and Register System - Dialogs - Using Y_INI

Quote:
Originally Posted by Dan. View Post
Huh, hello again Kush, I keep having problems with your REGISTER/LOGIN scripts, take a look at this:

Code:
(242) : error 017: undefined symbol "UserPath"
(244) : error 017: undefined symbol "UserPath"
(245) : error 017: undefined symbol "DIALOG_LOGIN"
(245) : warning 215: expression has no effect
(245) : error 001: expected token: ";", but found "-string-"
(245) : warning 215: expression has no effect
(245) : error 001: expected token: "-string end-", but found "-identifier-"
(245) : fatal error 107: too many error messages on one line

And here are the lines:

Code:
 public OnPlayerConnect(playerid)
{
    if(fexist(UserPath(playerid))) // 242
    {
        INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid); // 244
       ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"Type your password below to login.","Login","Quit"); //245
    }
    else
    {
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_WHITE"Registering...",""COL_WHITE"Type your password below to register a new account.","Register","Quit");
    }
    return 1;
}

I guess the errors are because DIALOG_LOGIN and UserPath are not defined, but take a look at this:

Code:
 // Register system things
#define DIALOG_REGISTER 1
#define DIALOG_LOGIN 2
#define DIALOG_SUCCESS_1 3
#define DIALOG_SUCCESS_2 4

#define UserPath "/Users/%s.ini"

The #define UserPath was "PATH" before.. changed it but still the same thing, so maybe you could help. And dont offer me your pastebin version, not going to copy my whole script into there, so some help, please.

I will show you mine.

Code:
#define DIALOG_REGISTER 1
#define DIALOG_LOGIN 2
#define DIALOG_SUCCESS_1 3
#define DIALOG_SUCCESS_2 4

#define PATH "/Users/%s.ini"

#define COL_WHITE "{FFFFFF}"
#define COL_RED "{F81414}"
#define COL_GREEN "{00FF22}"
#define COL_LIGHTBLUE "{00CED1}"
#define COLOR_RED 0xAA3333AA
#define COLOR_LIGHTBLUE 0x00BFFFFF

Code:
public OnPlayerConnect(playerid)
{
	if(fexist(UserPath(playerid)))
	{
		INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
		ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"Type your password below to login.","Login","Quit");
	}
	else
	{
	ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_WHITE"Registering...",""COL_WHITE"Type your password below to register a new account.","Register","Quit");
	}
	return 1;
}

Make sure you have your includes correct.

Code:
#include <YSI\y_ini>

Only an idiot cant fuck this up.
__________________
Shockey HD is offline   Reply With Quote
Old 01/08/2011, 06:11 PM   #19
Kush
Gangsta
 
Join Date: May 2011
Posts: 785
Reputation: 123
Default Re: Login and Register System - Dialogs - Using Y_INI

Quote:
Originally Posted by Dan. View Post
Huh, hello again Kush, I keep having problems with your REGISTER/LOGIN scripts, take a look at this:

Code:
(242) : error 017: undefined symbol "UserPath"
(244) : error 017: undefined symbol "UserPath"
(245) : error 017: undefined symbol "DIALOG_LOGIN"
(245) : warning 215: expression has no effect
(245) : error 001: expected token: ";", but found "-string-"
(245) : warning 215: expression has no effect
(245) : error 001: expected token: "-string end-", but found "-identifier-"
(245) : fatal error 107: too many error messages on one line

And here are the lines:

Code:
 public OnPlayerConnect(playerid)
{
    if(fexist(UserPath(playerid))) // 242
    {
        INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid); // 244
       ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"Type your password below to login.","Login","Quit"); //245
    }
    else
    {
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_WHITE"Registering...",""COL_WHITE"Type your password below to register a new account.","Register","Quit");
    }
    return 1;
}

I guess the errors are because DIALOG_LOGIN and UserPath are not defined, but take a look at this:

Code:
 // Register system things
#define DIALOG_REGISTER 1
#define DIALOG_LOGIN 2
#define DIALOG_SUCCESS_1 3
#define DIALOG_SUCCESS_2 4

#define UserPath "/Users/%s.ini"

The #define UserPath was "PATH" before.. changed it but still the same thing, so maybe you could help. And dont offer me your pastebin version, not going to copy my whole script into there, so some help, please.
The main idea for this tutorial was to explain the uses of each method used, including the different callbacks, functions, and responses. This is the same tutorial as my SII, only it's done in Y_INI and a few things has been changed. Either download the .pwn and see how everything is placed, or actually READ what I have written.
__________________
Quote:
Originally Posted by Dripac
i have more reputation than you, that means i am more clever than you my friend
Kush is offline   Reply With Quote
Old 02/08/2011, 05:01 AM   #20
jot16
Big Clucker
 
Join Date: Mar 2011
Posts: 177
Reputation: 0
Default Re: Login and Register System - Dialogs - Using Y_INI

I got this error.
Quote:
C:\Users\Jot\Desktop\SAMP Server\gamemodes\Banda.pwn(4) : fatal error 100: cannot read from file: "YSI\y_ini"

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
here are my includes.


jot16 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Tutorial] Login & Register system - dialogs - with y_ini Seven_of_Nine Tutorials 30 17/12/2016 09:20 AM
[FilterScript] [FS] ERegLog ( Advanced Register/Login System [Dialogs] ) aircombat Filterscripts 29 09/11/2014 09:30 PM
[Tutorial] Login and Register System - Dialogs - Using SII Kush Tutorials 69 02/07/2013 05:19 PM
[FilterScript] Register/login system (Dini, dialogs) pantelimonfl Filterscripts 6 08/03/2011 04:13 PM


All times are GMT. The time now is 04:23 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.