Keving's Flat-File DB makes Inventory Bug!!

11/16/2008 19:52 stephanyd#1
Just to warn peoples ... if you use Keving's Flat-File Database , it makes Inventory bug... After 14 items in inventory and if u dc and re login char is naked and not all items in inventory appears!
11/16/2008 20:06 tao4229#2
Check the loading of Inventory, it probably sucks.
11/16/2008 21:11 stephanyd#3
lol... i just changed all Cli.WriteString to Save.WriteString in public static void SaveChar(Character Charr) in Database.cs and now no more naked char if dc and relogin... but only save 15 items / 40 in inventory. Now i discovering coding by myself instead copy and paste:)
11/16/2008 22:14 alexbigfoot#4
lol, try with something like

Save part:
Code:
byte Count = 1;
foreach(string item in Charr.Inventory)
{
Cli.WriteString("Character","Inventory[" + Count.ToString() + "]", item);
}
Get inventory , from get mychar info`s part:

Code:
string wholeinv = "";

for(byte k = 1;k<41;k++)
{
string inv =  Cli.ReadString("Character","Inventory[ + k.ToString() + "]")
wholeinv += inv + "~";
}
Charr.PackedInventory = wholeinv;
it should be working, :D , just wrote it on a laptop(i`m normaly doing all C# stuff on a pc xP)

forgot to add, 90% from this is Ultimatum`s and 10% mine ( we did it thogheter )
11/17/2008 05:15 Ultimatum#5
Quote:
Originally Posted by alexbigfoot View Post
lol, try with something like
it should be working, :D , just wrote it on a laptop(i`m normaly doing all C# stuff on a pc xP)
[edit] id rather sort it through msn
11/17/2008 08:29 alexbigfoot#6
1.yea, i realy wrote it on a laptop , from what i remembered
and 2. i said u helped me ok?
11/17/2008 15:27 Ultimatum#7
Ok sorted through here instead, anyway

Quote:
byte Count = 1;
foreach(string item in Charr.Inventory)
{
Cli.WriteString("Character","Inventory[" + Count.ToString() + "]", item);
Count++;
}
11/17/2008 18:24 alexbigfoot#8
shit, i forgot to add that Count++; ,thx ultimatum
11/17/2008 18:59 stephanyd#9
i discovered not only inventory have that bug.... Warehouses too... after 15 items deposit , dc and relog and all warehouses are empty..lol
11/17/2008 19:30 alexbigfoot#10
lol...and u wait the answer from us right?
11/17/2008 21:05 stephanyd#11
Quote:
Originally Posted by alexbigfoot View Post
lol...and u wait the answer from us right?
Nope... just telling that problem so peoples can test and see if they have same problem.

i'm back to MySql anyway less problems than converting all source to .ini
11/17/2008 21:17 alexbigfoot#12
yea, and after , if u dont know how to make ur mysql(in ur source) to work properly , lol too many errors
11/17/2008 22:46 stephanyd#13
Quote:
Originally Posted by alexbigfoot View Post
yea, and after , if u dont know how to make ur mysql(in ur source) to work properly , lol too many errors
only 1 error in my server.. the SaveChar thing... what we call RollBack in ShadowCo....lol and i'll find out of epvpers the way to fix that.
11/18/2008 08:35 alexbigfoot#14
try to do an "save of each thing on its command"