player mobile serialize

Juzzver

Squire
Sep 17, 2013
191
17
18
Shard Name
Mythic World / Heavens Gate / Inceptum / NovaUO / Utopia / UOBG
Can you show debug errors with deserialization?
and show your pm script.
 

Cody

Gold Donator
May 28, 2016
110
12
18
29
Iowa
doomsdayreturns.webs.com
Shard Name
Doom's Day Returns
thanks for the quick reply here is my debug serial

World: Loading...An error was encountered while loading a saved object
- Type: Server.Mobiles.PlayerMobile
- Serial: 0x0001D565
Delete the object? (y/n)
Delete all objects of that type? (y/n)
 

Attachments

Juzzver

Squire
Sep 17, 2013
191
17
18
Shard Name
Mythic World / Heavens Gate / Inceptum / NovaUO / Utopia / UOBG
World: Loading...An error was encountered while loading a saved object
- Type: Server.Mobiles.PlayerMobile
- Serial: 0x0001D565
Delete the object? (y/n)
Delete all objects of that type? (y/n)
if you press "n" or "y" in debug mode - you can see information about serialization problem.
After merging your pm files, I see a problem with the order in which items are saved in different versions. They do not match, and this leads to conflict. Ideally, you need all the new elements that have appeared in the latest version of Playermobile to write under the new versions of serialization/deserialization, then you will avoid the conflict of loaded elements.
 

Cody

Gold Donator
May 28, 2016
110
12
18
29
Iowa
doomsdayreturns.webs.com
Shard Name
Doom's Day Returns
i havent the fanintest idea on serializations or how they can be written i seen a how to or tutorial but havent seen it when i tried to search for it
[doublepost=1531624038][/doublepost]Error:
System.Exception: Load failed (items=True, mobiles=False, guilds=False, data=Fal
se, type=Server.Items.RingOfJupiter, serial=0x4019904C) ---> System.OverflowExce
ption: Array dimensions exceeded supported range.

at Server.BaseAttributes..ctor(Item owner, GenericReader reader) in c:\Users\
CODY\Desktop\DoomsDay\Scripts\Misc\AOS.cs:line 3186

at Server.SAAbsorptionAttributes..ctor(Item owner, GenericReader reader) in c
:\Users\CODY\Desktop\DoomsDay\Scripts\Misc\AOS.cs:line 2567

at Server.Items.BaseJewel.Deserialize(GenericReader reader) in c:\Users\CODY\
Desktop\DoomsDay\Scripts\Items\Equipment\Jewelry\BaseJewel.cs:line 1162

at Server.Items.BaseRing.Deserialize(GenericReader reader) in c:\Users\CODY\D
esktop\DoomsDay\Scripts\Items\Equipment\Jewelry\Ring.cs:line 34

at Server.Items.GoldRing.Deserialize(GenericReader reader) in c:\Users\CODY\D
esktop\DoomsDay\Scripts\Items\Equipment\Jewelry\Ring.cs:line 71

at Server.Items.RingOfJupiter.Deserialize(GenericReader reader) in c:\Users\C
ODY\Desktop\DoomsDay\Scripts\Custom\Quests\Jupiter Armor Quest\RingOfJupiter.cs:
line 27

at Server.World.Load() in c:\Users\CODY\Desktop\DoomsDay\Server\World.cs:line
643

--- End of inner exception stack trace ---
at Server.World.Load() in c:\Users\CODY\Desktop\DoomsDay\Server\World.cs:line
860

at Server.Core.Main(String[] args) in c:\Users\CODY\Desktop\DoomsDay\Server\M
ain.cs:line 630

This exception is fatal, press return to exit
 

Juzzver

Squire
Sep 17, 2013
191
17
18
Shard Name
Mythic World / Heavens Gate / Inceptum / NovaUO / Utopia / UOBG
post your RingOfJupiter.cs and AOS.cs
 

Cody

Gold Donator
May 28, 2016
110
12
18
29
Iowa
doomsdayreturns.webs.com
Shard Name
Doom's Day Returns
im not entirely sure its either of them because its trying to delete all jewelry first call was Jupiter ring then gold ring then bracelets and kept going so ill post both those and my base jewel
[doublepost=1531798868][/doublepost]files
 

Attachments

Juzzver

Squire
Sep 17, 2013
191
17
18
Shard Name
Mythic World / Heavens Gate / Inceptum / NovaUO / Utopia / UOBG
the lines you have given in the log do not correspond to the lines in the code, you may have already tried to make your changes, as a result of which the numbering of the lines differs.

Anyway, the problem with order loading data may not match the data attribute, whereby you are addressing a non-existent attribute index.

To understand, the easiest way is to return to the moment when everything was loaded correctly and try to correctly build the order of saving (serialization) and reading data (deserialization)
 
  • Like
Reactions: CrafterEric

Cody

Gold Donator
May 28, 2016
110
12
18
29
Iowa
doomsdayreturns.webs.com
Shard Name
Doom's Day Returns
have another strange issue going on with ml quest i think in publish 57

this person im not sure what they are doing but they keep getting bugged on something not sure where neither do they any help would be amazing!!!


An error was encountered while loading a saved object
- Type: Server.Mobiles.PlayerMobile
- Serial: 0x0002CEF2
Delete the object? (y/n)
After pressing return an exception will be thrown and the server will terminate.

Error:
System.Exception: Load failed (items=False, mobiles=True, guilds=False, data=False, type=Server.Mobiles.PlayerMobile, serial=0x0002CEF2) ---> System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at Server.Mobiles.PlayerMobile.Deserialize(GenericReader reader) in C:\Users\codya\Desktop\DoomsDayUpdateFinal\Scripts\Mobiles\PlayerMobile.cs:line 4904
at Server.World.Load()
--- End of inner exception stack trace ---
at Server.World.Load()
at Server.Core.Main(String[] args)
This exception is fatal, press return to exit

Line 4904: m_Collections.Add((Collection)reader.ReadInt(), reader.ReadInt());

serial method :


if (version < 42)
{
List<BaseQuest> quests = QuestReader.Quests(reader, this);
Dictionary<QuestChain, BaseChain> dic = QuestReader.Chains(reader);

if (quests != null && quests.Count > 0)
MondainQuestData.QuestData[this] = quests;

if (dic != null && dic.Count > 0)
MondainQuestData.ChainData[this] = dic;
}

m_Collections = new Dictionary<Collection, int>();
m_RewardTitles = new List<object>();

for (int i = reader.ReadInt(); i > 0; i--)
{
m_Collections.Add((Collection)reader.ReadInt(), reader.ReadInt());
}

for (int i = reader.ReadInt(); i > 0; i--)
{
m_RewardTitles.Add(QuestReader.Object(reader));
}

m_SelectedTitle = reader.ReadInt();

goto case 28;
}