Code:
            //PlayerMobile pm = this as PlayerMobile;
            XmlValue money = (XmlValue)XmlAttach.FindAttachment(this, typeof (XmlValue), "money");

this shows that you at first had the right idea but you didnt really understand it.
"this" is a reference to the current instance of the class you are in. Therefor "this" would be your gump.
You need to get a reference to the player in your gump and then pass it in your FindAttachment method
 
Code:
            //PlayerMobile pm = this as PlayerMobile;
            XmlValue money = (XmlValue)XmlAttach.FindAttachment(this, typeof (XmlValue), "money");

this shows that you at first had the right idea but you didnt really understand it.
"this" is a reference to the current instance of the class you are in. Therefor "this" would be your gump.
You need to get a reference to the player in your gump and then pass it in your FindAttachment method

So.. ?
Code:
         if (money != null)
{
            AddLabel(198, 95, 1156, String.Format("{0}", this ));
  }
 
No, again this is the reference to the current instance of the class you write it in. Therefor "this" is the Gump itsef. You would need to add the player reference in the Constructor and pass it when you create the Gump
 
Code:
        public sorakagump() : base( 0, 0 )
        {
            this.Closable=false;
            this.Disposable=true;
            this.Dragable=true;
            this.Resizable=false;
            //PlayerMobile pm = (PlayerMobile)m;
       
            XmlValue money = (XmlValue)XmlAttach.FindAttachment(this, typeof (XmlValue), "money");
            AddPage(0);
            AddBackground(1, 40, 279, 122, 2620);
            PlayerMobile mobile = (PlayerMobile)m;
                if (m.Player && m != null)
            {
   
         if (money != null)
{
            AddLabel(198, 95, 1156, String.Format("{0}", money ));
  }
                       
            AddLabel(123, 51, 1171, "Name");
            AddLabel(115, 96, 165, "Gold");
            AddImage(8, 65, 21639);
            AddItem(198, 95, 3823);
            AddItem(185, 101, 3823);
            AddItem(210, 100, 3823);   

    }
            }

Sighhh :D

CS0103: Line 44: The name 'm' does not exist in the current context
CS0103: Line 59: The name 'm' does not exist in the current context
CS0103: Line 59: The name 'm' does not exist in the current context
 
Well m is not defined in your Gump, also why would you make a cast to a PlayerMobile variable when you dont use it afterwards?

Code:
		public sorakagump(PlayerMobile pm) : base( 0, 0 )
		{
			Closable=false;
			Disposable=true;
			Dragable=true;
			Resizable=false;

			AddPage(0);
			AddBackground(1, 40, 279, 122, 2620);
			XmlValue money = (XmlValue)XmlAttach.FindAttachment(pm, typeof (XmlValue), "money");

			if (money != null)
			{
				AddLabel(198, 95, 1156, String.Format("{0}", money ));
			}

			AddLabel(123, 51, 1171, "Name");
			AddLabel(115, 96, 165, "Gold");
			AddImage(8, 65, 21639);
			AddItem(198, 95, 3823);
			AddItem(185, 101, 3823);
			AddItem(210, 100, 3823);
		}
You need to give the Gump the reference to the PlayerMobile where you call it from.
 
Back