Jump to content
  • 0
Sign in to follow this  
hadiesyafiq

Need help Unknown SQL Error

Question

hi all...

my map-server sometimes showing unknown SQL error...can someone help me how to fix this?

below is the picture of map-server ..

unknownerror.png

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0
On 7/5/2021 at 7:34 PM, SinjiPrasetio said:

Hello,
Are you made a source modification?
This error should not occurs on fresh Hercules.

Can you provide more information about this?

Now i found this error will appear when character weight over 50%..but how to fix it?

Share this post


Link to post
Share on other sites
  • 1

Well please check your char,c at arount line 3943
You fill find this code

static void char_parse_frommap_scdata_update(int fd)
{
	int account_id = RFIFOL(fd, 2);
	int char_id = RFIFOL(fd, 6);
	int val1 = RFIFOL(fd, 12);
	int val2 = RFIFOL(fd, 16);
	int val3 = RFIFOL(fd, 20);
	int val4 = RFIFOL(fd, 24);
	short type = RFIFOW(fd, 10);

	if (SQL_ERROR == SQL->Query(inter->sql_handle, "REPLACE INTO `%s`"
			" (`account_id`,`char_id`,`type`,`tick`,`total_tick`,`val1`,`val2`,`val3`,`val4`)"
			" VALUES ('%d','%d','%d','%d','%d','%d','%d','%d','%d')",
			scdata_db, account_id, char_id, type, INFINITE_DURATION, INFINITE_DURATION, val1, val2, val3, val4)
	) {
		Sql_ShowDebug(inter->sql_handle);
	}
	RFIFOSKIP(fd, 28);
}

check if this code is te same with your source, if your code is changed, please follow above code, and recompile.

Hope this helps!

Share this post


Link to post
Share on other sites
  • 0
2 hours ago, SinjiPrasetio said:

Well please check your char,c at arount line 3943
You fill find this code

static void char_parse_frommap_scdata_update(int fd) { int account_id = RFIFOL(fd, 2); int char_id = RFIFOL(fd, 6); int val1 = RFIFOL(fd, 12); int val2 = RFIFOL(fd, 16); int val3 = RFIFOL(fd, 20); int val4 = RFIFOL(fd, 24); short type = RFIFOW(fd, 10); if (SQL_ERROR == SQL->Query(inter->sql_handle, "REPLACE INTO `%s`" " (`account_id`,`char_id`,`type`,`tick`,`total_tick`,`val1`,`val2`,`val3`,`val4`)" " VALUES ('%d','%d','%d','%d','%d','%d','%d','%d','%d')", scdata_db, account_id, char_id, type, INFINITE_DURATION, INFINITE_DURATION, val1, val2, val3, val4) ) { Sql_ShowDebug(inter->sql_handle); } RFIFOSKIP(fd, 28); }


static void char_parse_frommap_scdata_update(int fd)
{
	int account_id = RFIFOL(fd, 2);
	int char_id = RFIFOL(fd, 6);
	int val1 = RFIFOL(fd, 12);
	int val2 = RFIFOL(fd, 16);
	int val3 = RFIFOL(fd, 20);
	int val4 = RFIFOL(fd, 24);
	short type = RFIFOW(fd, 10);

	if (SQL_ERROR == SQL->Query(inter->sql_handle, "REPLACE INTO `%s`"
			" (`account_id`,`char_id`,`type`,`tick`,`total_tick`,`val1`,`val2`,`val3`,`val4`)"
			" VALUES ('%d','%d','%d','%d','%d','%d','%d','%d','%d')",
			scdata_db, account_id, char_id, type, INFINITE_DURATION, INFINITE_DURATION, val1, val2, val3, val4)
	) {
		Sql_ShowDebug(inter->sql_handle);
	}
	RFIFOSKIP(fd, 28);
}

check if this code is te same with your source, if your code is changed, please follow above code, and recompile.

Hope this helps!

Thank you very much sir @SinjiPrasetio it work...it different from mine just INFINITE_DURATION...mine just single word...

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.