[Tutorial] Login and Register System - Dialogs - Using Y_INI

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.
Reply

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?
Reply

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.
Reply

Thanks Sky, you're the best!
Reply

Nice xD
Reply

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
Reply

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

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
Reply

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)))
Reply

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.
Reply

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

How to change Name in game with y_ini ?
Reply

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.
Reply

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

Try to update your SA-MP Version
Maybe :P
Reply

Thxs
Reply

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.
Reply

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.
Reply

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

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


Forum Jump:


Users browsing this thread: 5 Guest(s)