[Help]Can someone explain me this?

09/16/2008 16:11 pauldexter#1
[Only registered and activated users can see links. Click Here To Register...]

the one is the take an item from warehouse
MyChar.AddItem(Item, 0, ItemUID); gets an error sometimes

and that one above is in the SaveChar
Code:
        public static void SaveChar(Character Charr)
        {
            try
            {
                Charr.PackInventory();
                Charr.PackEquips();
                Charr.PackSkills();
                Charr.PackProfs();
                Charr.PackWarehouses();
                Charr.PackEnemies();
                Charr.PackFriends();
                MySqlCommand Command = new MySqlCommand("UPDATE `Characters` SET `CharName` = '" + Charr.Name + "', `Level` = " + Charr.Level + ",`Exp` = " + Charr.Exp + ",`GuildDonation` = " + Charr.GuildDonation + ",`Strength` = " + Charr.Str + ",`Agility` = " + Charr.Agi + ",`Vitality` = " + Charr.Vit + ",`Spirit` = " + Charr.Spi + ",`Job` = " + Charr.Job + ",`Model` = " + Charr.RealModel + ",`Money` = " + Charr.Silvers + ",`CPs` = " + Charr.CPs + ",`CurrentHP` = " + Charr.CurHP + ",`StatPoints` = " + Charr.StatP + ",`MyGuild` = " + Charr.GuildID + ",`GuildPos` = " + Charr.GuildPosition + ",`LocationMap` = " + Charr.LocMap + ",`LocationX` = " + Charr.LocX + ",`LocationY` = " + Charr.LocY + ",`Hair` = " + Charr.Hair + ",`Equipment` = '" + Charr.PackedEquips + "',`Inventory` = '" + Charr.PackedInventory + "',`PKPoints` = " + Charr.PKPoints + ",`PrevMap` = " + Charr.PrevMap + ", `Skills` = '" + Charr.PackedSkills + "', `Profs` = '" + Charr.PackedProfs + "',`RBCount` = " + Charr.RBCount + ",`Avatar` = " + Charr.Avatar + ",`WHMoney` = " + Charr.WHSilvers + ",`VP` = " + Charr.VP + ",`Warehouses` = '" + Charr.PackedWHs + "',`Friends` = '" + Charr.PackedFriends + "',`Enemies` = '" + Charr.PackedEnemies + "',`QuestMob` = '" + Charr.QuestMob + "',`QuestKO` = " + Charr.QuestKO + " WHERE `Account` = '" + Charr.MyClient.Account + "'", Connection);
                Command.ExecuteNonQuery();
            }
            catch (Exception Exc) { General.WriteLine(Convert.ToString(Exc));}
        }
thanks in advance
09/16/2008 16:12 -Shoҳ-#2
MySQl drop (You got the wrong lotf backup, duuh)
09/16/2008 16:22 glupkotrup#3
Lol yeah... :rolleyes: Maybe you mixed them up and you've selected the wrong one? :p
09/16/2008 16:53 pauldexter#4
i figured out the savechar, there are 2 characters in account "mena2". (the one is solved)

the problem now is the Warehouse additem(or means get items from your warehouse).
i used 2 source and it the warehouse problem still same.
but well, its not a big problem, it just an error, an error that not affect the game XD.
09/16/2008 18:10 taguro#5
Quote:
Originally Posted by pauldexter View Post
i figured out the savechar, there are 2 characters in account "mena2". (the one is solved)

the problem now is the Warehouse additem(or means get items from your warehouse).
i used 2 source and it the warehouse problem still same.
but well, its not a big problem, it just an error, an error that not affect the game XD.
Unfortunately, the way LOTF is coded, all errors effect the game. Just taking up extra memory running the server effects lag, amount of accounts that can be logged in... stability in general.
09/16/2008 18:32 glupkotrup#6
/True...
But anyways without any errors the stability will be way increased and I think the capacity will go up to 40-45 players :rolleyes:
09/16/2008 20:21 stephanyd#7
Quote:
Originally Posted by pauldexter View Post
i figured out the savechar, there are 2 characters in account "mena2". (the one is solved)

the problem now is the Warehouse additem(or means get items from your warehouse).
i used 2 source and it the warehouse problem still same.
but well, its not a big problem, it just an error, an error that not affect the game XD.
Hey.. i fixed that kind of error in my server..lol... just remove changename commands and no more errors like that.
09/17/2008 11:32 pauldexter#8
thanks all for the informations!
09/17/2008 13:29 tao4229#9
Quote:
Originally Posted by pauldexter View Post
thanks all for the informations!
The SaveChar error can also come from crappy coding of SaveChar(Character)...
09/17/2008 13:33 glupkotrup#10
Thanks = Click the button thanks in the bottom right corner :rolleyes:

And you are welcome (talking in the name of all)
09/17/2008 15:39 taguro#11
Quote:
Originally Posted by tao4229 View Post
The SaveChar error can also come from crappy coding of SaveChar(Character)...
Why don't you offer an alternative code?
09/17/2008 23:37 tao4229#12
Quote:
Originally Posted by taguro View Post
Why don't you offer an alternative code?
Because too many people want the code, not to learn from it or anything just to have it fixed and try to be better than others...
09/18/2008 08:07 taguro#13
Quote:
Originally Posted by tao4229 View Post
Because too many people want the code, not to learn from it or anything just to have it fixed and try to be better than others...
Some do want to learn, others do not... thats not for us to decide, its for them. Personally, I've learned a great deal from this project.
09/18/2008 13:30 tao4229#14
Quote:
Originally Posted by taguro View Post
Some do want to learn, others do not... thats not for us to decide, its for them. Personally, I've learned a great deal from this project.
Getting tired of helping people who only want the code not teh knowledge D:<
09/18/2008 13:33 Hax4Or#15
loool