:rolleyes:i was playing around with this alignment system everything works fine. I add the stone then set join, change inactive to the desired alignment, it changes/displays alignment & everything but after I restart server the join stone reverts to inactive... :eek:why it do that?
Tried comparing it to the faction system join stone but this stone is just a double click & no gump so I am unsure.... my guess is the serialize de-serialize method?..

just:confused:curious
 

Attachments

  • Kingdom Stone.cs
    3.5 KB · Views: 12
Last edited:
Change Line 71
m_Kingdom = (Kingdom)reader.ReadEncodedInt();
to
Kingdom = (Kingdom)reader.ReadEncodedInt();

or Add this code after Line 71
setName();
InvalidateProperties();

Maybe if you do this,it will solve your problem.
 
:(no that didnt work,
(I was half a sleep when i posted this let me try clearing up my question;))

its the "status" that resets to inactive on server restart the Kingdom stays set
the status has 3 options
Innactive,
Join,
Leave
its default setting is innactive, so i set a stone props it change {kingdom} to "goodguys" -example
then i tick the join option under {status} & when i restart server it reverts to Innactive

so its probly the Status method?o_O
 
:(no that didnt work,
(I was half a sleep when i posted this let me try clearing up my question;))

its the "status" that resets to inactive on server restart the Kingdom stays set
the status has 3 options
Innactive,
Join,
Leave
its default setting is innactive, so i set a stone props it change {kingdom} to "goodguys" -example
then i tick the join option under {status} & when i restart server it reverts to Innactive

so its probly the Status method?o_O

Try Serializing/Deserializing m_Status.
 
wow duh thank you lokai i should have thought of that lol:rolleyes:
been working odd hours me brain no work a soo good lately :confused:
Code:
public override void Serialize( GenericWriter writer )
        {
            base.Serialize( writer );

            writer.Write( (int) 0 ); // version
            writer.WriteEncodedInt((int)m_Kingdom);
            writer.WriteEncodedInt((int)m_Status);    
        }

        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize( reader );

            int version = reader.ReadInt();
            m_Kingdom = (Kingdom)reader.ReadEncodedInt();
            m_Status = (Status)reader.ReadEncodedInt();
           
        }
 
I have the same problem with the original joinstones too, as I assign myself a faction on reboot it automatically removes it from me ... I'm going crazy
 
Back