Help with MYSQL 41-4
#1

Sorry guys. This is a new version of MYSQL for me. The last one that I used was like R34. I'm trying to set up a function to save, and one to load player stats. How would I go about doing that since I can't do it like I used to, lol.
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=616103

Try this one
Reply
#3

Quote:
Originally Posted by Tenka
Посмотреть сообщение
He said save, not set up MySQL connection.

You gotta create an enum like PlayerInfo, PlayerData or something like that, and create some callbacks so you can call them OnGameModeInit, OnPlayerDisconnect etc..

If you're not able to do that I suggest you stick to some tutorials on this forum or even filterscript created for MySQL register/login system.
Reply
#4

No, I have all that, I'm talking the sql side. I'm not sure which MYSQL Function to use anymore since
while(mysql_fetch_row_format(query,"|"))
{
mysql_fetch_field_row(savingstring, "id"); Player[playerid][AccountID] = strval(savingstring);
}
ect anymore.
It's been a long time since I've used the sql plugin and it's very different
Reply
#5

All I'm looking for is what mysql function I'd use to get the information from the database, and to store it to a variable
Reply
#6

https://github.com/pBlueG/SA-MP-MySQ...xample_scripts

Try BlueG's example scripts
* Cached
* ORM

how data are loaded and stored/saved to the server's database 'phpmyadmin'

player name
password
Admin level
Positions X Y Z angle
ETC....

if you have experience with MySQL try to read the source code like a novel to understand
every basic function written

Hopefully i helped you friend

With love and respect MobtiesgangSA
Reply
#7

Only the cache functions that are used when loading data have been changed (retrieving data and getting number of rows). You save as you would save in R34 version.

https://sampwiki.blast.hk/wiki/MySQL/R33#Cache_functions -> https://sampwiki.blast.hk/wiki/MySQL#Cache_functions

For example, loading an integer from 4th row and 1st column:
pawn Код:
//R34
new int_dest = cache_get_row_int(3, 0);
would become:
pawn Код:
// R41-4
new int_dest;
cache_get_value_index_int(3, 0, int_dest);

// or

new int_dest;
cache_get_value_int(3, 0, int_dest);
By reading the description of the functions can be easy to recognize which function was renamed into what.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)