SA-MP Forums Archive
[Tutorial] MySQL [R41-2] Registration 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 [R41-2] Registration System (/showthread.php?tid=627520)

Pages: 1 2


Re: MySQL [R41-2] Registration System - Variable™ - 10.03.2017

Thanks for your opinion.


Re: MySQL [R41-2] Registration System - SteSte - 13.07.2017

*BUMP

I've been looking for a R42-3 tutorial, the last tutorial I followed gave me errors, is this compatible with 42-3?


Re: MySQL [R41-2] Registration System - valerastar - 26.07.2017

Help please :c
It can't connect so MySQL Server. IDK what to do.
MySQL plugin version R41-3
Log by Log-plugin v0.4
Quote:

[21:04:18] [ERROR] CConnection::CConnection - establishing connection to MySQL database failed: #2013 'Lost connection to MySQL server at 'reading authorization packet', system error: 10060'
[21:04:19] [ERROR] CConnection::CConnection - establishing connection to MySQL database failed: #2013 'Lost connection to MySQL server at 'reading authorization packet', system error: 10060'
[21:04:20] [ERROR] CConnection::CConnection - establishing connection to MySQL database failed: #2013 'Lost connection to MySQL server at 'reading authorization packet', system error: 10060'
[21:04:21] [ERROR] CConnection::CConnection - establishing connection to MySQL database failed: #2013 'Lost connection to MySQL server at 'reading authorization packet', system error: 10060'

EDIT: Anyway...found some1 with same problem on the forum. Only suggestion was - downgrade on version MySQL R41-2. Now works.


Re: MySQL [R41-2] Registration System - Uberanwar - 02.12.2017

Hi guys, I have some issues on this.

In my script, I make new tables for a database. It seems that I get this error, ** [MySQL]: Unknown column 'fDivision' in 'field list'. If I were to fix that, I'd just delete my existing database, and start up the server, and all the tables that were newly added in the script will be created by itself. But what if I have my players account in that database? How can I make that it would create by itself in the existing database (the newly added tables) upon server execution?


Re: MySQL [R41-2] Registration System - AjaxM - 02.12.2017

Quote:
Originally Posted by Uberanwar
View Post
Hi guys, I have some issues on this.

In my script, I make new tables for a database. It seems that I get this error, ** [MySQL]: Unknown column 'fDivision' in 'field list'. If I were to fix that, I'd just delete my existing database, and start up the server, and all the tables that were newly added in the script will be created by itself. But what if I have my players account in that database? How can I make that it would create by itself in the existing database (the newly added tables) upon server execution?
Just add another field from your phpMyadmin.


Re: MySQL [R41-2] Registration System - Uberanwar - 02.12.2017

Quote:
Originally Posted by AjaxM
View Post
Just add another field from your phpMyadmin.
What if there are a lot of tables added in the script in many different structures? It would be an headache to do that manually I think. If it's not a lot then it would be alright for me to do that manually otherwise


Re: MySQL [R41-2] Registration System - AjaxM - 02.12.2017

Quote:
Originally Posted by Uberanwar
View Post
What if there are a lot of tables added in the script in many different structures? It would be an headache to do that manually I think. If it's not a lot then it would be alright for me to do that manually otherwise
Both is not a headache. It is easy to add a field to an existing table or to add a new table.


Re: MySQL [R41-2] Registration System - maddinat0r - 02.12.2017

So I was bored and looked through the code, and somehow thought that I already saw that code somewhere. Then I remembered: this looks a lot like the example login script from the plugin repository! (https://github.com/pBlueG/SA-MP-MySQ...stem-cache.pwn)
After quickly comparing those scripts: this IS the same code from the example script, with the difference of different variable names and reformulated code comments.
Konstantinos originally wrote this (and an ORM counterpart) script on 26. August 2016.


Re: MySQL [R41-2] Registration System - SintaksTR - 02.01.2018

forward public OnPlayerDataCheck(playerid, corrupt_check);
Change it


Re: MySQL [R41-2] Registration System - MrCesar - 09.01.2018

[22:54:09] plugin.mysql: Unloading plugin...
[22:54:09] plugin.mysql: Plugin unloaded.

I get this on the logs once I try to run the server, any idea what's causing it?


Re: MySQL [R41-2] Registration System - Flamehaze7 - 29.01.2018

does MySQL plugins work on ubuntu too?


Re: MySQL [R41-2] Registration System - OptimusBloodHunter - 29.01.2018

Quote:
Originally Posted by Flamehaze7
View Post
does MySQL plugins work on ubuntu too?
Yep, I use plugin for Debian on ubuntu


Re: MySQL [R41-2] Registration System - RxErT - 13.02.2018

Great and useful tutorial, it definitely helped me out!


Re: MySQL [R41-2] Registration System - JnniorDoug - 18.02.2018

Something's wrong going on ...
Whenever I make a new registration and I'll log in I do not win the cash, I need to close my game and open it again to earn cash


Re: MySQL [R41-2] Registration System - insus100 - 21.02.2018

Quote:

Something's wrong going on ...
Whenever I make a new registration and I'll log in I do not win the cash, I need to close my game and open it again to earn cash

Same happens to me, also when I try to register with another username (ID 2), data will be saved into ID 1, so it's not working properly...

EDIT:
This can be fixed by adding below OnPlayerRegister this:
PHP Code:
forward OnPlayerRegister(playerid);
public 
OnPlayerRegister(playerid)
{
    
// retrieves the ID generated for an AUTO_INCREMENT column by the sent query
    
Player[playerid][ID] = cache_insert_id();