Raised This Month: $ Target: $400
 0% 

Thread worker was unable to start


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
phela133
Member
Join Date: Apr 2008
Location: Poland/Norway
Old 03-26-2011 , 17:39   Thread worker was unable to start
Reply With Quote #1

Code:
L 03/15/2011 - 18:37:36: [MySQL] Thread worker was unable to start. L 03/15/2011 - 18:37:36: [AMXX] Displaying debug trace (plugin "expmod.amxx") L 03/15/2011 - 18:37:36: [AMXX] Run time error 10: native error (native "SQL_ThreadQuery") L 03/15/2011 - 18:37:36: [AMXX]    [0] expmod.sma::handleSqlSaveData (line 3099)
PHP Code:
public handleSqlSaveData(FailStateHandle:QueryError[], ErrcodeData[], DataSize) {     // lots of error checking     if(Errcode)     {         log_amx("Error on Table query: %s",Error)     }     if(FailState == TQUERY_CONNECT_FAILED)     {         log_amx("Could not connect to SQL database.")         return PLUGIN_CONTINUE     }     else if(FailState == TQUERY_QUERY_FAILED)     {         log_amx("Table Query failed.")         return PLUGIN_CONTINUE     }          new id = Data[0];     if(SQL_MoreResults(Query))     {         new szCommand[512], szAuthid[32];         get_user_authid(id, szAuthid, 31);         format(szCommand, 511, "UPDATE %s SET `xp` = %i, `lvl` = %i, `pkt` = %i,`money` = %i WHERE `authid` = '%s'", gszTable, gXp[id], gLevel[id], gPoint[id], gPlayerMoney[id],szAuthid);         SQL_ThreadQuery(g_hTuple, "handleSqlSaveDataOther", szCommand);     }     else     {         new szCommand[512], szAuthid[32];         get_user_authid(id, szAuthid, 31);         format(szCommand, 511, "INSERT INTO %s (`authid`, `xp`, `lvl`, `pkt`,`money`) VALUES('%s', %i, %i, %i,%i)", gszTable, szAuthid, gXp[id], gLevel[id], gPoint[id], gPlayerMoney[id]);         SQL_ThreadQuery(g_hTuple, "handleSqlSaveDataOther", szCommand);     }          return PLUGIN_CONTINUE } 
Line 3099 is:
SQL_ThreadQuery(g_hTuple, "handleSqlSaveDataOther", szCommand);

I checked the query in the "phpmyadmin". It is correct, I have no more ideas how to fix it. Please help.
__________________
4Fragers.com [EasyBlock][ExpMod] - 46.4.99.111:27015

phela133 is offline
Send a message via Skype™ to phela133
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 03-26-2011 , 17:41   Re: Thread worker was unable to start
Reply With Quote #2

This is not a fault of your plugin.
This is a fault of the SQLx where sometimes this occurs.
You can search for other threads regarding this issue, but AFAIK there is no official fix.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
phela133
Member
Join Date: Apr 2008
Location: Poland/Norway
Old 03-28-2011 , 03:19   Re: Thread worker was unable to start
Reply With Quote #3

In that case please write some good mysql.
__________________
4Fragers.com [EasyBlock][ExpMod] - 46.4.99.111:27015

phela133 is offline
Send a message via Skype™ to phela133
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 03-28-2011 , 06:24   Re: Thread worker was unable to start
Reply With Quote #4

There is a simple way to get rid of that problem - save player data with only 1 query. It seems that you first check if there is data in mysql and then use update or insert. You don't need to check if data of some player was previously inserted, because you should know that from loading and even if you don't know that, then you can just use REPLACE INTO and that will work as both insert and update (you just need to set authid as PRIMARY KEY when you create table).
__________________
Impossible is Nothing
Sylwester is offline
phela133
Member
Join Date: Apr 2008
Location: Poland/Norway
Old 03-28-2011 , 17:31   Re: Thread worker was unable to start
Reply With Quote #5

Hmm ok, but I have a database of valuable records, which I do not want to lose.
__________________
4Fragers.com [EasyBlock][ExpMod] - 46.4.99.111:27015

phela133 is offline
Send a message via Skype™ to phela133
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 03-28-2011 , 19:50   Re: Thread worker was unable to start
Reply With Quote #6

and what would make you lose your records?
__________________
Impossible is Nothing
Sylwester is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:52.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode