SA-MP Forums Archive
[Tutorial] Mysql Register/Login system! - 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] Mysql Register/Login system! (/showthread.php?tid=305994)

Pages: 1 2 3


Re: Mysql Register/Login system! - [DOG]irinel1996 - 29.12.2011

Thank you man, you helped me.
sscanf helps anywhere. :O Hehe...


Respuesta: Mysql Register/Login system! - [Nikk] - 29.12.2011

SQL = shit, im still prefer Dini or Y_ini. It's more easy to use. And its the same for me.


Re: Respuesta: Mysql Register/Login system! - [DOG]irinel1996 - 29.12.2011

Quote:
Originally Posted by Nikk123
View Post
SQL = shit, im still prefer Dini or Y_ini. It's more easy to use. And its the same for me.
MySQL is faster, and now, for me it's easier.


Re: Respuesta: Mysql Register/Login system! - FireCat - 29.12.2011

Quote:
Originally Posted by Nikk123
View Post
SQL = shit, im still prefer Dini or Y_ini. It's more easy to use. And its the same for me.
Why are you refering shit with preferences? -.-
Think.
SQL is better for some stuff, Dini isn't good for anything, and Y_Ini has it's goodies.


Re: Respuesta: Mysql Register/Login system! - FarSe. - 29.12.2011

Quote:
Originally Posted by Nikk123
View Post
SQL = shit, im still prefer Dini or Y_ini. It's more easy to use. And its the same for me.
SQL is used by government institutes,webs,hosts,even your account is stored with SQL so SQL isn't a shit.
__
By the way,nice tutorial


Respuesta: Mysql Register/Login system! - [Nikk] - 29.12.2011

It's only what i think, sorry if dont like to you guys, but when i start with pawno im using Dini. Now I have a habit of using.
and shit is a way of saying, dont take as bad.
Sry for my bad english


Re: Respuesta: Mysql Register/Login system! - Konstantinos - 29.02.2012

Quote:
Originally Posted by [Nikk]
View Post
It's only what i think, sorry if dont like to you guys, but when i start with pawno im using Dini. Now I have a habit of using.
and shit is a way of saying, dont take as bad.
Sry for my bad english
When I started I was using Dini too because it was the easier. Then I learnt y_ini and I change the whole Gamemode to y_ini. Although, I ended using SQLite. Databases are amazing. I wanted to leant MySQL too but I got some problems with phpMyAdmin and with Web host, so I stopped there. Just the Dini is outdated.


Re: Mysql Register/Login system! - FireCat - 29.02.2012

Quote:
Originally Posted by Jochemd
Посмотреть сообщение
Why don't you use mysql_format?
dafuq? I made this a few months ago... <.< Like in october 2011
But I posted it in december 2011.


Re: Mysql Register/Login system! - fadhilkab - 15.03.2012

Nice


Re: Mysql Register/Login system! - logoster - 06.05.2012

nice but what about adding an admin level and what format for admin cmds?


Re: Mysql Register/Login system! - SwiftKidZ - 08.05.2012

This is amazing


Re: Mysql Register/Login system! - vIBIENNYx - 26.05.2012

I keep getting these errors:

pawn Код:
C:\Users\Ben\Desktop\SF-RP\gamemodes\bensamp.pwn(939) : error 017: undefined symbol "Regdialog"
C:\Users\Ben\Desktop\SF-RP\gamemodes\bensamp.pwn(954) : error 017: undefined symbol "Logindialog"
C:\Users\Ben\Desktop\SF-RP\gamemodes\bensamp.pwn(958) : error 017: undefined symbol "Regdialog"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.
Cant find anything in the main post to fix this.


Re: Mysql Register/Login system! - Mustang[GTS] - 02.08.2012

i Always Getting this errors

Код:
C:\Users\Wietse\Desktop\server bugge\pawno\new.pwn(64) : error 010: invalid function or declaration
C:\Users\Wietse\Desktop\server bugge\pawno\new.pwn(66) : error 010: invalid function or declaration
C:\Users\Wietse\Desktop\server bugge\pawno\new.pwn(70) : error 010: invalid function or declaration
C:\Users\Wietse\Desktop\server bugge\pawno\new.pwn(73) : error 021: symbol already defined: "mysql_real_escape_string"
C:\Users\Wietse\Desktop\server bugge\pawno\new.pwn(103) : error 010: invalid function or declaration
C:\Users\Wietse\Desktop\server bugge\pawno\new.pwn(105) : error 010: invalid function or declaration
C:\Users\Wietse\Desktop\server bugge\pawno\new.pwn(109) : error 010: invalid function or declaration
C:\Users\Wietse\Desktop\server bugge\pawno\new.pwn(111) : error 021: symbol already defined: "LoginPlayer"
C:\Users\Wietse\Desktop\server bugge\pawno\new.pwn(123) : error 001: expected token: ";", but found "stock"
C:\Users\Wietse\Desktop\server bugge\pawno\new.pwn(311) : warning 203: symbol is never used: "EscapedText"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


9 Errors.



Re: Mysql Register/Login system! - PawnFox - 10.08.2012

Hello, i've read this tutorial and i copy it in Pawn. When i compile i recive the following errors:
Код:
C:\Documents and Settings\Unlimited\Desktop\MySQL.pwn(198) : error 028: invalid subscript (not an array or too many subscripts): "pInfo"
C:\Documents and Settings\Unlimited\Desktop\MySQL.pwn(198) : warning 215: expression has no effect
C:\Documents and Settings\Unlimited\Desktop\MySQL.pwn(198) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Unlimited\Desktop\MySQL.pwn(198) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Unlimited\Desktop\MySQL.pwn(198) : fatal error 107: too many error messages on one line

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


4 Errors.
The code is the following:
pawn Код:
stock LoadStats(playerid)
{
    new
        pName[24],
        Query[80]
    ;
   
    GetPlayerName(playerid, pName, sizeof (pName));
    format(Query, sizeof(Query), "SELECT * FROM `Users` WHERE `Username` = '%s' ", pName);
    mysql_query(Query);
    mysql_store_result();
    mysql_fetch_row_format(Query, "|");
    sscanf( Query, "e<p<|>s[24]s[23]i>", pInfo[playerid] );
    mysql_free_result();
    GivePlayerMoney(playerid,PInfo[playerid][CASH]);
    return 1;
}
Line 198 is: sscanf( Query, "e<p<|>s[24]s[23]i>", pInfo[playerid] );

NOTE: I have included <sscanf>. Whats the problem !??!

Nvm, i found the problem.

Thanks for tut :P


Re: Mysql Register/Login system! - FireCat - 10.08.2012

Quote:
Originally Posted by [V]PawnFox
Посмотреть сообщение
Hello, i've read this tutorial and i copy it in Pawn. When i compile i recive the following errors:
Код:
C:\Documents and Settings\Unlimited\Desktop\MySQL.pwn(198) : error 028: invalid subscript (not an array or too many subscripts): "pInfo"
C:\Documents and Settings\Unlimited\Desktop\MySQL.pwn(198) : warning 215: expression has no effect
C:\Documents and Settings\Unlimited\Desktop\MySQL.pwn(198) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Unlimited\Desktop\MySQL.pwn(198) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Unlimited\Desktop\MySQL.pwn(198) : fatal error 107: too many error messages on one line

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


4 Errors.
The code is the following:
pawn Код:
stock LoadStats(playerid)
{
    new
        pName[24],
        Query[80]
    ;
   
    GetPlayerName(playerid, pName, sizeof (pName));
    format(Query, sizeof(Query), "SELECT * FROM `Users` WHERE `Username` = '%s' ", pName);
    mysql_query(Query);
    mysql_store_result();
    mysql_fetch_row_format(Query, "|");
    sscanf( Query, "e<p<|>s[24]s[23]i>", pInfo[playerid] );
    mysql_free_result();
    GivePlayerMoney(playerid,PInfo[playerid][CASH]);
    return 1;
}
Line 198 is: sscanf( Query, "e<p<|>s[24]s[23]i>", pInfo[playerid] );

NOTE: I have included <sscanf>. Whats the problem !??!

Nvm, i found the problem.

Thanks for tut :P
Ups!
Turn that to a capital P "PInfo"

Edit: In the tutorial, its with a capital P


Re: Mysql Register/Login system! - PawnFox - 10.08.2012

xD

Yeah, that was the problem .. i've noticed after i've made the post .


Re: Mysql Register/Login system! - Zilvinass - 10.12.2012

Please help!

Код:
D:\desktop\srv\gamemodes\mysqlla.pwn(77) : error 017: undefined symbol "mysql_query"
D:\desktop\srv\gamemodes\mysqlla.pwn(82) : warning 202: number of arguments does not match definition
D:\desktop\srv\gamemodes\mysqlla.pwn(264) : error 017: undefined symbol "Regdialog"
D:\desktop\srv\gamemodes\mysqlla.pwn(264) : error 017: undefined symbol "cblue"
D:\desktop\srv\gamemodes\mysqlla.pwn(264) : warning 215: expression has no effect
D:\desktop\srv\gamemodes\mysqlla.pwn(264) : warning 215: expression has no effect
D:\desktop\srv\gamemodes\mysqlla.pwn(264) : warning 215: expression has no effect
D:\desktop\srv\gamemodes\mysqlla.pwn(264) : error 001: expected token: ";", but found ")"
D:\desktop\srv\gamemodes\mysqlla.pwn(264) : fatal error 107: too many error messages on one line

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


5 Errors.
Who can help me? Who helps thank you..


Re: Mysql Register/Login system! - KingPilot - 19.12.2012

Code:
C:\Users\Gubblek\Desktop\Server\gamemodes\Server.pwn(77) : error 017: undefined symbol "dialogid"
C:\Users\Gubblek\Desktop\Server\gamemodes\Server.pwn(79) : error 017: undefined symbol "inputtext"
C:\Users\Gubblek\Desktop\Server\gamemodes\Server.pwn(81) : error 017: undefined symbol "Regdialog"
C:\Users\Gubblek\Desktop\Server\gamemodes\Server.pwn(81) : error 017: undefined symbol "NPUT"
C:\Users\Gubblek\Desktop\Server\gamemodes\Server.pwn(81) : error 017: undefined symbol "cblue"
C:\Users\Gubblek\Desktop\Server\gamemodes\Server.pwn(81) : fatal error 107: too many error messages on one line

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


6 Errors.
Sorry Im new on this.. What have i got to do here?


Re: Mysql Register/Login system! - DJTunes - 21.12.2012

I need help:
I have an error on line 83 and the error says this:
Code:
C:\Users\Zach\Desktop\SA-MP SERVER\IW.pwn(83) : error 037: invalid string (possibly non-terminated string)
C:\Users\Zach\Desktop\SA-MP SERVER\IW.pwn(83) : error 017: undefined symbol "YourDatabaseName"
C:\Users\Zach\Desktop\SA-MP SERVER\IW.pwn(83) : error 029: invalid expression, assumed zero
C:\Users\Zach\Desktop\SA-MP SERVER\IW.pwn(83) : fatal error 107: too many error messages on one line

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


4 Errors.
This is what I have on that line:
Code:
mysql_connect(mysql_host,mysql_user,mysql_database ,mysql_password)
See anything wrong?


Re: Mysql Register/Login system! - kamzaf - 21.12.2012

Quote:
Originally Posted by DJTunes
View Post
I need help:
I have an error on line 83 and the error says this:
Code:
C:\Users\Zach\Desktop\SA-MP SERVER\IW.pwn(83) : error 037: invalid string (possibly non-terminated string)
C:\Users\Zach\Desktop\SA-MP SERVER\IW.pwn(83) : error 017: undefined symbol "YourDatabaseName"
C:\Users\Zach\Desktop\SA-MP SERVER\IW.pwn(83) : error 029: invalid expression, assumed zero
C:\Users\Zach\Desktop\SA-MP SERVER\IW.pwn(83) : fatal error 107: too many error messages on one line

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


4 Errors.
This is what I have on that line:
Code:
mysql_connect(mysql_host,mysql_user,mysql_database ,mysql_password)
See anything wrong?
is this line properly indented at the top:
pawn Code:
#define mysql_database "YourDatabaseName"