Basic MySQL help - 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: Basic MySQL help (
/showthread.php?tid=646123)
Basic MySQL help -
tbedy - 10.12.2017
My gamemode works on MySQL plugin R39-4
but when I put in MySQL plugin R41-4 there is these errors:
Код:
C:\Users\Toni\Desktop\MYSQL\gamemodes\SATDMv12.pwn(832) : error 017: undefined symbol "cache_get_data"
C:\Users\Toni\Desktop\MYSQL\gamemodes\SATDMv12.pwn(835) : error 017: undefined symbol "cache_get_field_content"
C:\Users\Toni\Desktop\MYSQL\gamemodes\SATDMv12.pwn(836) : error 017: undefined symbol "cache_get_field_content_int"
C:\Users\Toni\Desktop\MYSQL\gamemodes\SATDMv12.pwn(837) : warning 213: tag mismatch
C:\Users\Toni\Desktop\MYSQL\gamemodes\SATDMv12.pwn(838) : warning 213: tag mismatch
Код:
forward ohban(playerid);
public ohban(playerid) {
new rows,fields;
cache_get_data(rows, fields, mysql);
if(rows) {
new Query[250],savename[32];
cache_get_field_content(0, "Name", savename, mysql, 32);
if(cache_get_field_content_int(0, "banned", mysql) == 1) return SendClientMessage(playerid,COLOR_BRIGHTRED,"GRESKA: This player Hardware ID is already banned");
mysql_format(mysql, Query, sizeof Query,"UPDATE `gpci` SET `banned` = 1 WHERE `Name` = '%s'",savename);
mysql_tquery(mysql, Query, "", "");
return SendClientMessage(playerid,green,"Player Hardware ID Successfully banned");
}
return SendClientMessage(playerid,COLOR_BRIGHTRED,"GRESKA: This username not exist on database");
}
------------
Код:
C:\Users\Toni\Desktop\MYSQL\gamemodes\SATDMv12.pwn(797) : warning 213: tag mismatch
C:\Users\Toni\Desktop\MYSQL\gamemodes\SATDMv12.pwn(798) : warning 213: tag mismatch
Код:
mysql_format(mysql,Query,sizeof Query,"UPDATE `accounts` SET `sboost` = 0 WHERE `Name` = '%s'",pName(playerid));
mysql_tquery(mysql, Query, "", "");
I would appreciate any help
Re: Basic MySQL help -
RIDE2DAY - 10.12.2017
Yes, there are some code-breaking changes. Check this out:
https://sampforum.blast.hk/showthread.php?tid=616103