SA-MP Forums Archive
[Tutorial] Login and Register System - Dialogs - Using Y_INI - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Tutorials (https://sampforum.blast.hk/forumdisplay.php?fid=70)
+---- Thread: [Tutorial] Login and Register System - Dialogs - Using Y_INI (/showthread.php?tid=273088)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14


Re: Login and Register System - Dialogs - Using Y_INI - DanishHaq - 22.11.2013

Quote:
Originally Posted by AnonScripter
View Post
2 problems:
1. it's not necessary but why the player's password look like digits in the user file [Password = 104268307]

2. when an unregistered player join the server and click on "Quit" instead of entering a password and click on "Register", the server will kick him and the account will be save in users file even he didn't press on "Register"
So the problem is when he join the server another time, the server will ask him to login using a password. and he didn't enter a password on last time, he did "Quit" ..
1: that's what the hash stock does.
2: you must have a problem in your own code under OnDialogResponse or OnPlayerConnect where it will create the file even though no password etc. was entered.

Quote:
Originally Posted by DownDuckling
View Post
How would I go about and make some admin commands? (Barely learning scripting :P) Thanks
There are tutorials of this nature.

Quote:
Originally Posted by Audi_Quattrix
View Post
You have lose identitation on line 306 remove the tab so its all in line to fix it
Don't forget it's an old script, and that is a slight problem anyway :P.


Re: Login and Register System - Dialogs - Using Y_INI - Hansrutger - 27.11.2013

A quick question. I didn't understand exactly everything but still understand a bit.

How do I define another path because when I login and register, it tells me in my samp-server.exe that the file was not found and could not be created. How do I change
Code:
#define PATH "/Users/%s.ini"
to another direction? It got me confused as the backslash are not the same as the ordinary directive backslash, i.e. you use "C:\" and not "C:/". Anyways, could anyone explain?


Re: Login and Register System - Dialogs - Using Y_INI - 2KY - 28.11.2013

Quote:
Originally Posted by Hansrutger
View Post
A quick question. I didn't understand exactly everything but still understand a bit.

How do I define another path because when I login and register, it tells me in my samp-server.exe that the file was not found and could not be created. How do I change
Code:
#define PATH "/Users/%s.ini"
to another direction? It got me confused as the backslash are not the same as the ordinary directive backslash, i.e. you use "C:\" and not "C:/". Anyways, could anyone explain?
You can only navigate inside of the scriptfiles directory.


Re: Login and Register System - Dialogs - Using Y_INI - Hansrutger - 28.11.2013

Thanks Sky, you're the best!


Re: Login and Register System - Dialogs - Using Y_INI - Edu4rd - 25.12.2013

Nice xD


Re: Login and Register System - Dialogs - Using Y_INI - SkyLe - 24.01.2014

Guys I still got problems with compiling the pwn:

fatal error 100: cannot read from file: "YSI\y_ini"

I have opened the pawno.exe in the correct folder and after that, opened my script
I have remembered the correct "\" in the #include

Tried to look it up on other posts, but can't seem to find the problem - really annoying using 2 hours on a single line


Re: Login and Register System - Dialogs - Using Y_INI - Rudiz - 08.02.2014

Is there any chance to impose... choice of skins for the player after the register?


Re: Login and Register System - Dialogs - Using Y_INI - Extraordinariness - 26.02.2014

C:\Documents and Settings\SAMP-Purposes\Desktop\SAMP Server\gamemodes\TDScript3.pwn(116) : error 017: undefined symbol "UserPath"
C:\Documents and Settings\SAMP-Purposes\Desktop\SAMP Server\gamemodes\TDScript3.pwn(11 : error 017: undefined symbol "UserPath"
C:\Documents and Settings\SAMP-Purposes\Desktop\SAMP Server\gamemodes\TDScript3.pwn(119) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Documents and Settings\SAMP-Purposes\Desktop\SAMP Server\gamemodes\TDScript3.pwn(119) : error 017: undefined symbol "COL_WHITE"
C:\Documents and Settings\SAMP-Purposes\Desktop\SAMP Server\gamemodes\TDScript3.pwn(119) : warning 215: expression has no effect
C:\Documents and Settings\SAMP-Purposes\Desktop\SAMP Server\gamemodes\TDScript3.pwn(119) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Documents and Settings\SAMP-Purposes\Desktop\SAMP Server\gamemodes\TDScript3.pwn(119) : fatal error 107: too many error messages on one line

I get these errors


Re: Login and Register System - Dialogs - Using Y_INI - Praa - 03.03.2014

Hey man, can you help me with an error?

Error:
Code:
#:\#\#\gamemode.pwn(119) : error 001: expected token: "-string end-", but found "-identifier-"
#:\#\#\gamemode.pwn(119) : warning 215: expression has no effect
#:\#\#\gamemode.pwn(119) : error 001: expected token: ";", but found ")"
#:\#\#\gamemode.pwn(119) : error 029: invalid expression, assumed zero
#:\#\#\gamemode.pwn(119) : fatal error 107: too many error messages on one line
Script:
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;
}
The line:
Code:
if(fexist(UserPath(playerid)))



Re: Login and Register System - Dialogs - Using Y_INI - Praa - 03.03.2014

Quote:
Originally Posted by Extraordinariness
View Post
C:\Documents and Settings\SAMP-Purposes\Desktop\SAMP Server\gamemodes\TDScript3.pwn(116) : error 017: undefined symbol "UserPath"
C:\Documents and Settings\SAMP-Purposes\Desktop\SAMP Server\gamemodes\TDScript3.pwn(11 : error 017: undefined symbol "UserPath"
C:\Documents and Settings\SAMP-Purposes\Desktop\SAMP Server\gamemodes\TDScript3.pwn(119) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Documents and Settings\SAMP-Purposes\Desktop\SAMP Server\gamemodes\TDScript3.pwn(119) : error 017: undefined symbol "COL_WHITE"
C:\Documents and Settings\SAMP-Purposes\Desktop\SAMP Server\gamemodes\TDScript3.pwn(119) : warning 215: expression has no effect
C:\Documents and Settings\SAMP-Purposes\Desktop\SAMP Server\gamemodes\TDScript3.pwn(119) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Documents and Settings\SAMP-Purposes\Desktop\SAMP Server\gamemodes\TDScript3.pwn(119) : fatal error 107: too many error messages on one line

I get these errors
Code:
C:\Documents and Settings\SAMP-Purposes\Desktop\SAMP Server\gamemodes\TDScript3.pwn(116) : error 017: undefined symbol "UserPath"
C:\Documents and Settings\SAMP-Purposes\Desktop\SAMP Server\gamemodes\TDScript3.pwn(118) : error 017: undefined symbol "UserPath"
You didn't defined the symbol.
Change the :
Code:
#define PATH "/Users/%s.ini"
to
Code:
#define UserPath "/Users/%s.ini"
And
Code:
C:\Documents and Settings\SAMP-Purposes\Desktop\SAMP Server\gamemodes\TDScript3.pwn(119) : error 017: undefined symbol "COL_WHITE"
you didn't defined the COL_WHITE, which is the White Color

Code:
#define COL_WHITE 0xFFFFFF
try this.


Re: Login and Register System - Dialogs - Using Y_INI - ChandraLouis - 07.03.2014

Help when im connected it keep me to tell me login after i login


Re: Login and Register System - Dialogs - Using Y_INI - VenomMancer - 20.03.2014

How to change Name in game with y_ini ?


Re: Login and Register System - Dialogs - Using Y_INI - Flstene - 20.03.2014

how to fix this error


D:\New folder\pawno\new.pwn(4) : fatal error 100: cannot read from file: "YSI\y_ini"

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.


Re: Login and Register System - Dialogs - Using Y_INI - ]Rafaellos[ - 21.03.2014

Download YSI guys. Stop posting your error. If you follow the tutorial correctly everything will work fine.


Re: Login and Register System - Dialogs - Using Y_INI - VenomMancer - 23.03.2014

Try to update your SA-MP Version
Maybe :P


Re: Login and Register System - Dialogs - Using Y_INI - gravey - 25.03.2014

Thxs


Re: Login and Register System - Dialogs - Using Y_INI - GeekSiMo - 20.04.2014

C:\Users\SiMohamed\Downloads\Compressed\Los Santos Turf Wars\gamemodes\LosSantosTW.pwn(976) : error 021: symbol already defined: "OnPlayerConnect"
C:\Users\SiMohamed\Downloads\Compressed\Los Santos Turf Wars\gamemodes\LosSantosTW.pwn(1024) : error 021: symbol already defined: "OnPlayerDisconnect"
C:\Users\SiMohamed\Downloads\Compressed\Los Santos Turf Wars\gamemodes\LosSantosTW.pwn(1051) : warning 209: function "OnPlayerDisconnect" should return a value
C:\Users\SiMohamed\Downloads\Compressed\Los Santos Turf Wars\gamemodes\LosSantosTW.pwn(1313) : error 021: symbol already defined: "OnPlayerDeath"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Errors.


Re: Login and Register System - Dialogs - Using Y_INI - Cena44 - 20.04.2014

Quote:
Originally Posted by GeekSiMo
Посмотреть сообщение
C:\Users\SiMohamed\Downloads\Compressed\Los Santos Turf Wars\gamemodes\LosSantosTW.pwn(976) : error 021: symbol already defined: "OnPlayerConnect"
C:\Users\SiMohamed\Downloads\Compressed\Los Santos Turf Wars\gamemodes\LosSantosTW.pwn(1024) : error 021: symbol already defined: "OnPlayerDisconnect"
C:\Users\SiMohamed\Downloads\Compressed\Los Santos Turf Wars\gamemodes\LosSantosTW.pwn(1051) : warning 209: function "OnPlayerDisconnect" should return a value
C:\Users\SiMohamed\Downloads\Compressed\Los Santos Turf Wars\gamemodes\LosSantosTW.pwn(1313) : error 021: symbol already defined: "OnPlayerDeath"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Errors.
You added an extra OnPlayerDeath, OnPlayerConnect, and OnPlayerDisconnect, you also forgot to add
pawn Код:
return 1;
}
to OnPlayerDisconnect.


Re: Login and Register System - Dialogs - Using Y_INI - N0SsL0 - 27.04.2014

IT dosenґґt save the player info? Help?


Re: Login and Register System - Dialogs - Using Y_INI - UnknownOwner - 27.04.2014

Quote:
Originally Posted by N0SsL0
Посмотреть сообщение
IT dosenґґt save the player info? Help?
Ye, same here...