Im trying to make it so on attachment edit, it adds the floats etc.. to the row that correctly corresponds to the Username & Slot.
Код:
public OnPlayerEditAttachedObject(playerid, response, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ) { new handle = SQL::OpenEx(SQL::UPDATE2, ""ATTACHMENTS"", "Username", pNick(playerid), "Slot", index); Anyone can help? il be greatfull |
public OnPlayerEditAttachedObject(playerid, response, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ)
{ new handle = SQL::OpenEx(SQL::UPDATE2, ""ATTACHMENTS"", "Username", pNick(playerid), "Slot", index); Change This new handle = SQL::OpenEx(SQL::UPDATE2, "ATTACHMENTS", "Username", pNick(playerid), "Slot", index); |
i Use
#define ATTACHMENTS "Attachments" Just ease of mind, i did try just "Attachments" but still get the error. |
Use this;
new handle = SQL::OpenEx(SQL::UPDATE2, ""ATTACHMENTS"", "Username", pNick(playerid), "Slot", "", index); |
new handle = SQL::OpenEx(SQL::UPDATE2, ATTACHMENTS, "Username", pNick(playerid), "Slot", "", index);
Use this;
new handle = SQL::OpenEx(SQL::UPDATE2, ""ATTACHMENTS"", "Username", pNick(playerid), "Slot", "", index); |
Is it possible to create 2 or 3 connections and work with them at the same time?
|
invalid function or declaration
C:\Games\GTA San Andreas\Server\HTB\V3\pawno\include\easy-mysql.inc(7) : error 010: invalid function or declaration C:\Games\GTA San Andreas\Server\HTB\V3\pawno\include\easy-mysql.inc(21) : error 010: invalid function or declaration C:\Games\GTA San Andreas\Server\HTB\V3\pawno\include\easy-mysql.inc(25) : error 010: invalid function or declaration C:\Games\GTA San Andreas\Server\HTB\V3\pawno\include\easy-mysql.inc(28) : error 010: invalid function or declaration C:\Games\GTA San Andreas\Server\HTB\V3\pawno\include\easy-mysql.inc(30) : error 010: invalid function or declaration C:\Games\GTA San Andreas\Server\HTB\V3\pawno\include\easy-mysql.inc(36) : error 010: invalid function or declaration C:\Games\GTA San Andreas\Server\HTB\V3\pawno\include\easy-mysql.inc(38) : error 010: invalid function or declaration C:\Games\GTA San Andreas\Server\HTB\V3\pawno\include\easy-mysql.inc(40) : error 010: invalid function or declaration C:\Games\GTA San Andreas\Server\HTB\V3\pawno\include\easy-mysql.inc(42) : error 010: invalid function or declaration C:\Games\GTA San Andreas\Server\HTB\V3\pawno\include\easy-mysql.inc(45) : error 010: invalid function or declaration C:\Games\GTA San Andreas\Server\HTB\V3\pawno\include\easy-mysql.inc(47) : error 010: invalid function or declaration C:\Games\GTA San Andreas\Server\HTB\V3\pawno\include\easy-mysql.inc(52) : error 010: invalid function or declaration C:\Games\GTA San Andreas\Server\HTB\V3\pawno\include\easy-mysql.inc(58) : error 010: invalid function or declaration C:\Games\GTA San Andreas\Server\HTB\V3\pawno\include\easy-mysql.inc(63) : error 010: invalid function or declaration C:\Games\GTA San Andreas\Server\HTB\V3\pawno\include\easy-mysql.inc(66) : error 010: invalid function or declaration C:\Games\GTA San Andreas\Server\HTB\V3\pawno\include\easy-mysql.inc(69) : error 010: invalid function or declaration C:\Games\GTA San Andreas\Server\HTB\V3\pawno\include\easy-mysql.inc(71) : error 010: invalid function or declaration C:\Games\GTA San Andreas\Server\HTB\V3\pawno\include\easy-mysql.inc(73) : error 010: invalid function or declaration C:\Games\GTA San Andreas\Server\HTB\V3\pawno\include\easy-mysql.inc(76) : error 010: invalid function or declaration C:\Games\GTA San Andreas\Server\HTB\V3\pawno\include\easy-mysql.inc(78) : error 010: invalid function or declaration C:\Games\GTA San Andreas\Server\HTB\V3\pawno\include\easy-mysql.inc(80) : error 075: input line too long (after substitutions) C:\Games\GTA San Andreas\Server\HTB\V3\pawno\include\easy-mysql.inc(85) : error 010: invalid function or declaration C:\Games\GTA San Andreas\Server\HTB\V3\pawno\include\easy-mysql.inc(88) : error 010: invalid function or declaration C:\Games\GTA San Andreas\Server\HTB\V3\pawno\include\easy-mysql.inc(90) : error 010: invalid function or declaration C:\Games\GTA San Andreas\Server\HTB\V3\pawno\include\easy-mysql.inc(92) : error 010: invalid function or declaration C:\Games\GTA San Andreas\Server\HTB\V3\pawno\include\easy-mysql.inc(95) : error 010: invalid function or declaration
new string[128], names[24],money;
new handle = SQL::OpenEx(SQL::MREAD, "Accounts", "Money", "", "", "", -1, 10, -1, "Money");
SQL::ReadRetrievedRows(handle, i)
{
SQL::ReadString(handle, "AccountName", names, 24, i);
SQL::ReadInt(handle, "Money", money, i);
format(string, sizeof(string), "Name %s | Money: %d", names,money);
SendClientMessage(playerid, -1, string);
}
SQL::Close(handle);
[13:42:36] [DEBUG] mysql_query(1, "SELECT * FROM `Accounts` WHERE `Money`='' ORDER BY `Money` DESC LIMIT 10 ", 1)
[13:42:36] [DEBUG] CHandle::Execute(this=0x4f8c170, type=3, query=0x6705fd0)
[13:42:36] [DEBUG] CConnection::Execute(query=0x6705fd0, this=0x674f80, connection=0x4fa5968)
[13:42:36] [DEBUG] CQuery::Execute(this=0x6705fd0, connection=0x4fa5968)
[13:42:36] [INFO] query "SELECT * FROM `Accounts` WHERE `Money`='' ORDER BY `Money` DESC LIMIT 10 " successfully executed within 0.616 milliseconds
[13:42:36] [DEBUG] CResultSet::Create(connection=0x4fa5968, query_str='SELECT * FROM `Accounts` WHERE `Money`='' ORDER BY `Money` DESC LIMIT 10 ')
[13:42:36] [DEBUG] created new resultset '0x6710788'
[13:42:36] [DEBUG] fetched MySQL result '0x66f8990'
[13:42:36] [DEBUG] allocated 0 bytes for PAWN result
[13:42:36] [DEBUG] CHandle::Execute - return value: true
[13:42:36] [DEBUG] mysql_query: return value: '1'
[13:42:36] [DEBUG] cache_is_valid(1)
[13:42:36] [DEBUG] cache_is_valid: return value: 'true'
[13:42:36] [DEBUG] cache_get_row_count(0x05FFF1E0)
[13:42:36] [DEBUG] cache_get_row_count: return value: '1'
[13:42:36] [DEBUG] cache_get_row_count(0x05FFF1D8)
[13:42:36] [DEBUG] cache_get_row_count: return value: '1'
[13:42:36] [DEBUG] cache_is_valid(1)
[13:42:36] [DEBUG] cache_is_valid: return value: 'true'
[13:42:36] [DEBUG] cache_delete(1)
[13:42:36] [DEBUG] cache_delete: return value: '1'