[Plugin] [REL] MySQL Plugin (Now on github!)

Quote:
Originally Posted by DRIFT_HUNTER
Посмотреть сообщение
Im sure he requested R6 and R7 like i did few posts above...
Yeah it seems like that. Very well:

R7: http://forum.sa-mp.com/showpost.php?...postcount=5140

R8 - R34: https://code.******.com/p/sa-mp-mysq...unt+UploadedBy

R33 - R39-2+: https://github.com/pBlueG/SA-MP-MySQL/releases

Quote:
Originally Posted by ShiffeyTheGamer
Посмотреть сообщение
Links outdated?
^^^
Reply

Quote:
Originally Posted by iZN
Посмотреть сообщение
No, I mean to R6; I can't access them on the Github which sucks and the link's on this topic need permission.
Reply

R39-3 has been released.
Changes:
Код:
- bug-fix: incompatibility with plugins using the sampgdk, where callbacks sometimes aren't called
- bug-fix: MySQL client reported 'out of sync' error when using 'CALL' statements
- bug-fix: cosmetic issue with the HTML log
There are currently no downloads available. I'd appreciate it very much if someone could compile it on Debian 6 (i386/i686) with Boost 1.55 or higher and Windows with Visual Studio 2012 with Boost 1.55 or higher (the Boost libraries have to be compiled with the same compiler as the plugin ofc). If nobody volunteers, I'll add these downloads in about a week by myself(don't have the time to do that now).
Thanks to those people reporting the issues and helping me fixing them.
Reply

It was commented out on purpose (for Pawno's function list feature). The syntax is
Code:
orm_insert_inline(ORM:ormid, callback, const format_string[], {_, Float}:...);
That means you need to use
Code:
orm_insert_inline(AccountInfo[playerid][ACC_ORM_ID], using inline SetAccountID, "");
And yes, you always need to specify the format string parameter, or else you'll get that error #017.
Reply

Quote:
Originally Posted by maddinat0r
View Post
It was commented out on purpose (for Pawno's function list feature). The syntax is
Code:
orm_insert_inline(ORM:ormid, callback, const format_string[], {_, Float}:...);
That means you need to use
Code:
orm_insert_inline(AccountInfo[playerid][ACC_ORM_ID], using inline SetAccountID, "");
And yes, you always need to specify the format string parameter, or else you'll get that error #017.
Before removing the comments this is what I got.
Code:
error 017: undefined symbol "orm_insert_inline"
When I removed the comments, I got this, using it the same way you did above, both without the format string parameter and with it (I forgot about that completely though, so thanks for telling me).
Code:
error 035: argument type mismatch (argument 2)
Not sure what is wrong here. I don't have to use inline to get it the way I want it anyway, so it's not a disaster, but it would be nice

EDIT:
This is how I'm trying to use it.

Code:
if(strlen(inputtext) != 0)
{
    inline SetAccountID()
    {
        AccountInfo[playerid][AccountID] = cache_insert_id();
        RegisterEmail(playerid);
    }
    orm_insert_inline(AccountInfo[playerid][ACC_ORM_ID], using inline SetAccountID, "");
}
Reply

MYSQL PROBLEM!
Please help me!
http://forum.sa-mp.com/showthread.ph...32#post3364132
Reply

Quote:
Originally Posted by Knappen
View Post
Before removing the comments this is what I got.
Code:
error 017: undefined symbol "orm_insert_inline"
When I removed the comments, I got this, using it the same way you did above, both without the format string parameter and with it (I forgot about that completely though, so thanks for telling me).
Code:
error 035: argument type mismatch (argument 2)
Not sure what is wrong here. I don't have to use inline to get it the way I want it anyway, so it's not a disaster, but it would be nice

EDIT:
This is how I'm trying to use it.

Code:
if(strlen(inputtext) != 0)
{
    inline SetAccountID()
    {
        AccountInfo[playerid][AccountID] = cache_insert_id();
        RegisterEmail(playerid);
    }
    orm_insert_inline(AccountInfo[playerid][ACC_ORM_ID], using inline SetAccountID, "");
}
  1. don't edit the plugin include!
  2. take a look at this tutorial; 'orm_insert_inline' works just like that
Reply

Quote:
Originally Posted by maddinat0r
View Post
  1. don't edit the plugin include!
  2. take a look at this tutorial; 'orm_insert_inline' works just like that
pawn Code:
inline SetAccountID()
{
    AccountInfo[playerid][AccountID] = cache_insert_id();
    RegisterEmail(playerid);
}
orm_insert_inline(AccountInfo[playerid][ACC_ORM_ID], using inline SetAccountID, "");
Code:
error 017: undefined symbol "orm_insert_inline"
As I tried to explain earlier, I get this error. I have not edited the include.
Reply

Quote:
Originally Posted by maddinat0r
View Post
  1. don't edit the plugin include!
  2. take a look at this tutorial; 'orm_insert_inline' works just like that
How to build mysql r39-3?
Reply

MYSQL R33 PROBLEM! Check it: https://sampforum.blast.hk/showthread.php?tid=562434
Reply

Old plugin, R6 problem.

Quote:

[20:52:25] >> mysql_store_result( Connection handle: 1 )
[20:52:25] CMySQLHandler::StoreResult() - Result was stored.
[20:52:25] >> mysql_num_rows( Connection handle: 1 )
[20:52:25] CMySQLHandler::NumRows() - Returned 1 row(s)
[20:52:25] >> mysql_fetch_row_format( Connection handle: 1 )
[20:52:25] CMySQLHandler::FetchRow() - Result is empty.
[20:52:25] >> mysql_free_result( Connection handle: 1 )
[20:52:25] CMySQLHandler::FreeResult() - Result was successfully free'd.

The server was running just fine for quite some time and then that started. Various queries return 1 or more rows but the result is empty. What could have caused this?
Reply

Please, help me with Update MYSQL! https://sampforum.blast.hk/showthread.php?tid=562655
Reply

in case of compilation it is impossible to finish up to the end the project, help please. Writes not the unsolved external character to a Visual Studio. error LNK2019
Reply

Quote:
Originally Posted by Ralfie
Посмотреть сообщение
Hello, been getting that error recently without a response. Current MYSQL Version: R39-2

debug:
Код:
[CMD] /getinfo James1
[debug] Run time error 8: "Heap underflow"
[debug]  Heap pointer (HEA) is 0x2592C4, heap bottom (HLW) is 0x2592E4
[debug] AMX backtrace:
[debug] #0 0000f6c8 in public Mysql_GetPlayerInfo (playerid=35, index[]=@002592e4 "James1") at D:\Games\Server\gamemodes\Script.pwn:1481
function:
Код:
function Mysql_GetPlayerInfo(playerid, index[])
{
    new string[128];
    if (cache_num_rows() > 0)
    {
        new regdate[30], Lastip[30],
		admlevel, donor, kills, deaths, score, cash, heads, prestige, nuke, airs, tox, capz, laston, timeon;

		cache_get_field_content(0, "RegisterDate", regdate, g_SQL);
		cache_get_field_content(0, "lastip", Lastip, g_SQL);
        admlevel = cache_get_field_content_int(0, "Admin");
        donor = cache_get_field_content_int(0, "Donor");
        kills = cache_get_field_content_int(0, "Kills");
        deaths = cache_get_field_content_int(0, "Deaths");
        score = cache_get_field_content_int(0, "Score");
        cash = cache_get_field_content_int(0, "Money");
        heads = cache_get_field_content_int(0, "Headshots");
        prestige = cache_get_field_content_int(0, "Prestige");
		nuke = cache_get_field_content_int(0, "Nukes"); //thats line 1481
		airs = cache_get_field_content_int(0, "Airstrikes");
		tox = cache_get_field_content_int(0, "Toxins");
		capz = cache_get_field_content_int(0, "CapZones");
		laston = cache_get_field_content_int(0, "Laston");
		timeon = cache_get_field_content_int(0, "TimeOnline");

	 	//display the info.. etc...
    }
    else
    {
		//not reg.. etc..
    }
	return 1;
}
James1's stored info:
http://i.gyazo.com/f46f8fee71ea480e84c4091cffe6adeb.png
Uhh, not sure but please add a length argument to your 'cache_get_field_content' functions
Reply

Quote:
Originally Posted by Ralfie
Посмотреть сообщение
Alright, tho its not needed since that isn't an enum. But that didn't fix the problem sadly. Anyone?
show your complete code, along with the command.
Reply

Does anyone have a compiled R39-3 MySQL plugin for Ubuntu?

Would be grateful if someone could share/compile it..
Reply

Does anyone have a problem with queries that aren't executed?

Sometimes queries like this:
Код:
mysql_pquery(mysql, formatEx("DELETE FROM map_vtuning WHERE vehicleuid = '%d'", selling[playerid]));
aren't executed. There is no error/warning. I have all error warnings and I see nothing in logs
Reply

Enable MySQL debug at its maximum level and post the logs here.
Reply

Quote:
Originally Posted by Michalec
Посмотреть сообщение
Does anyone have a problem with queries that aren't executed?

Sometimes queries like this:
Код:
mysql_pquery(mysql, formatEx("DELETE FROM map_vtuning WHERE vehicleuid = '%d'", selling[playerid]));
aren't executed. There is no error/warning. I have all error warnings and I see nothing in logs
Just a side note

WRONG:
Код:
DELETE FROM map_vtuning WHERE vehicleuid = '%d'
Correct:
Код:
DELETE FROM `map_vtuning` WHERE `vehicleuid` = %d;
Reply

Getting a lot of segfaults lately which are apparently always caused by __kernel_vsyscall, whatever that may be. Not at all familiar with C++ so I'm not sure what the actual problem is.

Crashlog
Reply


Forum Jump:


Users browsing this thread: 31 Guest(s)