Jump to content
  • 0

item getting duplicated when put to storage


Heartbreak

Question


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  63
  • Reputation:   0
  • Joined:  12/02/12
  • Last Seen:  

10492638_643651545724324_204986526_o_zps

 

please help me.. i didnt changed anything in my kafra except the location.. 
this only happen to one player.. (as far as i know)
it doesnt happen to my own character..
and when that character reconnects.. it double the item

Edited by Heartbreak
Link to comment
Share on other sites

15 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

Interesting o: do you get any error in the consoe when the player duplicates the item? if so, can you show us please? 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  63
  • Reputation:   0
  • Joined:  12/02/12
  • Last Seen:  

yes there's an error: 
here
Untitled_zps2f8ff2d7.jpg

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

Hmm loooks like when you isntalled the server and the sql, somehow you did it wrong, i'm not too sure about this, i would recommend a reinstall of the sql, sry i'm not being of help at all, i hope someone else can lend you a hand o:

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  63
  • Reputation:   0
  • Joined:  12/02/12
  • Last Seen:  

it just got reinstalled =/

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  29
  • Topics Per Day:  0.01
  • Content Count:  270
  • Reputation:   20
  • Joined:  12/10/11
  • Last Seen:  

Could be a server error too, suggest a fresh SVN

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  1479
  • Reputation:   172
  • Joined:  12/14/11
  • Last Seen:  

Heartbreak, please reload every SQL table. if you have ever updated your server, please do the SQL upgrades.

 

to make it easy (but you'll lose everything), drop the ragnarok database, create a new one. then, reload main.sql and logs.sql on your ragnarok database (schema).

 

@Jasc, please do not mention SVN anymore. we are now using GIT. some guides asks users to use SVN and it leads to a horrible error. The guide as well as the rAthena SVN are outdated. Only for rAthena's SVN.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  22
  • Reputation:   1
  • Joined:  06/25/12
  • Last Seen:  

What did you change in your source code? It looks like you changed something that is in char.c, int_storage.c, int_mail.c or int_auction.
 
Look at all the changes you've changed within the source.
Here is an example of what you might have done:

StringBuf_AppendStr(&buf, "SELECT `id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `expire_time`, `unique_id`, `bound`, `favorite`, `customtable`");
for( j = 0; j < MAX_SLOTS; ++j )
StringBuf_Printf(&buf, ", `card%d`", j);
StringBuf_Printf(&buf, " FROM `%s` WHERE `char_id`=? LIMIT %d", schema_config.cart_db, MAX_CART);
 
if( SQL_ERROR == SqlStmt_PrepareStr(stmt, StringBuf_Value(&buf))
|| SQL_ERROR == SqlStmt_BindParam(stmt, 0, SQLDT_INT, &char_id, 0)
|| SQL_ERROR == SqlStmt_Execute(stmt)
|| SQL_ERROR == SqlStmt_BindColumn(stmt, 0, SQLDT_INT,         &tmp_item.id, 0, NULL, NULL)
|| SQL_ERROR == SqlStmt_BindColumn(stmt, 1, SQLDT_SHORT,       &tmp_item.nameid, 0, NULL, NULL)
|| SQL_ERROR == SqlStmt_BindColumn(stmt, 2, SQLDT_SHORT,       &tmp_item.amount, 0, NULL, NULL)
|| SQL_ERROR == SqlStmt_BindColumn(stmt, 3, SQLDT_UINT,        &tmp_item.equip, 0, NULL, NULL)
|| SQL_ERROR == SqlStmt_BindColumn(stmt, 4, SQLDT_CHAR,        &tmp_item.identify, 0, NULL, NULL)
|| SQL_ERROR == SqlStmt_BindColumn(stmt, 5, SQLDT_CHAR,        &tmp_item.refine, 0, NULL, NULL)
|| SQL_ERROR == SqlStmt_BindColumn(stmt, 6, SQLDT_CHAR,        &tmp_item.attribute, 0, NULL, NULL)
|| SQL_ERROR == SqlStmt_BindColumn(stmt, 7, SQLDT_UINT,        &tmp_item.expire_time, 0, NULL, NULL)
|| SQL_ERROR == SqlStmt_BindColumn(stmt, 8, SQLDT_ULONGLONG,   &tmp_item.unique_id, 0, NULL, NULL)
|| SQL_ERROR == SqlStmt_BindColumn(stmt, 9, SQLDT_CHAR,        &tmp_item.bound, 0, NULL, NULL)
|| SQL_ERROR == SqlStmt_BindColumn(stmt,10, SQLDT_CHAR,        &tmp_item.favorite, 0, NULL, NULL)
|| SQL_ERROR == SqlStmt_BindColumn(stmt,11, SQLDT_INT,     &tmp_item.customtable, 0, NULL, NULL) )
SqlStmt_ShowDebug(stmt);
for( i = 0; i < MAX_SLOTS; ++i )
if( SQL_ERROR == SqlStmt_BindColumn(stmt, 11+i, SQLDT_SHORT, &tmp_item.card[i], 0, NULL, NULL) )

 if you look closely below, customtable is assigned within the same area that card0 starts to begin.

|| SQL_ERROR == SqlStmt_BindColumn(stmt,11, SQLDT_INT,     &tmp_item.customtable, 0, NULL, NULL) )
SqlStmt_ShowDebug(stmt);
for( i = 0; i < MAX_SLOTS; ++i )
if( SQL_ERROR == SqlStmt_BindColumn(stmt,11+i, SQLDT_SHORT, &tmp_item.card[i], 0, NULL, NULL) )

 
to fix this you would have to change the value of 

if( SQL_ERROR == SqlStmt_BindColumn(stmt, 11+i, SQLDT_SHORT, &tmp_item.card[i], 0, NULL, NULL) )

to

if( SQL_ERROR == SqlStmt_BindColumn(stmt, 12+i, SQLDT_SHORT, &tmp_item.card[i], 0, NULL, NULL) )

 
 
The end result would look like this.

|| SQL_ERROR == SqlStmt_BindColumn(stmt,11, SQLDT_INT,     &tmp_item.customtable, 0, NULL, NULL) )
SqlStmt_ShowDebug(stmt);
for( i = 0; i < MAX_SLOTS; ++i )
if( SQL_ERROR == SqlStmt_BindColumn(stmt,12+i, SQLDT_SHORT, &tmp_item.card[i], 0, NULL, NULL) )

 
There may be multiple areas that you have changed that looks similar to what i've shown above.
Please note that this is an assumption of where you may have editted within your source code.

 

Also take note of how customtable is a INT and card is a SHORT which may be another case of why it's being truncated.

 

For future reference, try backing up your files before applying new changes to it.

 

Hope this helps, 

 

Sin

Edited by Sin
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  63
  • Reputation:   0
  • Joined:  12/02/12
  • Last Seen:  

i found 2 of those in my char.c.. =/
here: 

||	SQL_ERROR == SqlStmt_BindColumn(stmt, 9, SQLDT_ULONGLONG,   &tmp_item.unique_id, 0, NULL, NULL) )
		SqlStmt_ShowDebug(stmt);
	for( i = 0; i < MAX_SLOTS; ++i )
		if( SQL_ERROR == SqlStmt_BindColumn(stmt, 10+i, SQLDT_USHORT, &tmp_item.card[i], 0, NULL, NULL) )
			SqlStmt_ShowDebug(stmt);

and here:

 

	||	SQL_ERROR == SqlStmt_BindColumn(stmt, 9, SQLDT_ULONGLONG,   &tmp_item.unique_id, 0, NULL, NULL) )
		SqlStmt_ShowDebug(stmt);
	for( i = 0; i < MAX_SLOTS; ++i )
		if( SQL_ERROR == SqlStmt_BindColumn(stmt, 10+i, SQLDT_USHORT, &tmp_item.card[i], 0, NULL, NULL) )
			SqlStmt_ShowDebug(stmt);

should i edit both  ? 


tried changing both.. but nothing happen.. =/

does it have something to do with this error ? 
i get this everytime i start the server..
2_zps5994844f.jpg

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  22
  • Reputation:   1
  • Joined:  06/25/12
  • Last Seen:  

I don't know what the error above is directed to. Can you provide information on what you've changed within the source and what it looks like to you before you changed it.

 

Also are you able to log in? If so, can you check if your items are still being duplicated or not.

 

Are you still getting truncation errors on your console?

 

Whats shown above could be a  different issue.

Edited by Sin
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  63
  • Reputation:   0
  • Joined:  12/02/12
  • Last Seen:  

i didn't change anything in my src.. 
my whole server just got reinstalled by a dev..

i was able to log in.. after i followed those instructions.. 
but im still getting the same error.. :(

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  509
  • Reputation:   80
  • Joined:  11/20/11
  • Last Seen:  

this happened because your column has greater value than the size of column
this ever happened to someone, and crashing his server

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.01
  • Content Count:  241
  • Reputation:   18
  • Joined:  06/04/14
  • Last Seen:  

Same happens to mine. Hope to have it fixed. I just changed mine into a fresh SVN and loaded previous database and then poof! Storage bug.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  55
  • Reputation:   2
  • Joined:  06/09/14
  • Last Seen:  

lol this reminds of what happen to DarkRO before Storage got bugged.. everyone can dupe just by storage and then logout.

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

there was update to change SHORT to UNSIGNED SHORT for item id, also for the card0~card3

does it have something to do with this error ? 

i get this everytime i start the server..

2_zps5994844f.jpg

I imagine how long u don't update ur file? u just simple copy-paste db/const.txt value to newer copy?

because those constant for Option hardcoded on script.c, not in db/const.txt anymore :D

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.01
  • Content Count:  241
  • Reputation:   18
  • Joined:  06/04/14
  • Last Seen:  

lol this reminds of what happen to DarkRO before Storage got bugged.. everyone can dupe just by storage and then logout.

This is actually we're encountering how to fix this Sir Zeal?

@Cydh What should we do then? Thank you in advance Sir

 
Link to comment
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.   Paste as plain text instead

  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.

×
×
  • Create New...