SA-MP Forums Archive
Another problem with MySQL (3 errors) - 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)
+--- Thread: Another problem with MySQL (3 errors) (/showthread.php?tid=649176)



Another problem with MySQL (3 errors) - wallen - 04.02.2018

C:\Users\Wallen\Desktop\LS DM\gamemodes\grandlarc.pwn(590) : error 017: undefined symbol "cache_get_data"
C:\Users\Wallen\Desktop\LS DM\gamemodes\grandlarc.pwn(594) : error 017: undefined symbol "cache_get_field_content"
C:\Users\Wallen\Desktop\LS DM\gamemodes\grandlarc.pwn(595) : error 017: undefined symbol "cache_get_field_content_int"
C:\Users\Wallen\Desktop\LS DM\gamemodes\grandlarc.pwn(589) : warning 203: symbol is never used: "fields"

Line 589

Код:
 new rows, fields;
Line 590
Код:
 cache_get_data(rows, fields, mysql);
Line 594
Код:
cache_get_field_content(0, "Password", Player[playerid][Password], mysql, 129);
Line 595
Код:
Player[playerid][ID] = cache_get_field_content_int(0, "ID");



Re: Another problem with MySQL (3 errors) - Mugala - 04.02.2018

you have to use correct version of MySQL (plugin & inc)
for this time, it's looks like R33 version.

SA:MP Thread link: https://sampforum.blast.hk/showthread.php?tid=56564
Github (Download) link: https://github.com/pBlueG/SA-MP-MySQL/releases
Wiki: https://sampwiki.blast.hk/wiki/MySQL/R33


Re: Another problem with MySQL (3 errors) - wallen - 04.02.2018

I did, still errors.


Re: Another problem with MySQL (3 errors) - Hunud - 04.02.2018

Try with MySQL R39 ver.


Re: Another problem with MySQL (3 errors) - wallen - 04.02.2018

C:\Users\Wallen\Desktop\LS DM\gamemodes\grandlarc.pwn(95) : warning 213: tag mismatch
C:\Users\Wallen\Desktop\LS DM\gamemodes\grandlarc.pwn(96) : warning 213: tag mismatch
C:\Users\Wallen\Desktop\LS DM\gamemodes\grandlarc.pwn(397) : warning 213: tag mismatch
C:\Users\Wallen\Desktop\LS DM\gamemodes\grandlarc.pwn(590) : warning 213: tag mismatch
C:\Users\Wallen\Desktop\LS DM\gamemodes\grandlarc.pwn(594) : warning 213: tag mismatch

95 and 96 lines

Код:
 mysql_format(mysql, query, sizeof(query), "SELECT `Password`, `ID` FROM `accounts` WHERE `Name` = '%e' LIMIT 1", playername);
Код:
 mysql_tquery(mysql, query, "OnAccountCheck", "i", playerid);
397 590 and 594 lines

Код:
mysql = mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_DATABASE, MYSQL_PASSWORD);
Код:
cache_get_data(rows, fields, mysql);
Код:
cache_get_field_content(0, "Password", Player[playerid][Password], mysql, 129);



Re: Another problem with MySQL (3 errors) - Stev - 04.02.2018

Did you create the connection handle variable?

Код:
new MySQL:mysql;



Re: Another problem with MySQL (3 errors) - wallen - 04.02.2018



Yeah, top of gamemode


Re: Another problem with MySQL (3 errors) - wallen - 04.02.2018

Btw, it's this shit tutorial all buggy https://sampforum.blast.hk/showthread.php?tid=574714, i'm not even on half this tutorial, stuck at
Код:
forward OnAccountCheck(playerid); public OnAccountCheck(playerid)  ecc
and

Код:
public OnPlayerConnect(playerid)
https://i.imgur.com/ATPHZM7.png


Re: Another problem with MySQL (3 errors) - wallen - 04.02.2018

Followed this tutorial: https://sampforum.blast.hk/showthread.php?tid=627520 pretty decent one, switched from Y_INI to MySQL, i'd advice this to everyone who needs a mysql saving system.