Author Topic: GUI help  (Read 1091 times)

The variable dose not work.

Code: [Select]
CRP_Cash.setText("$ @ PitroRPData.getData(%data.bl_id).valueMoney");
Code: [Select]
//--- OBJECT WRITE BEGIN ---
new GuiTextCtrl(PitroGUI) {
   profile = "GuiTextProfile";
   horizSizing = "right";
   vertSizing = "bottom";
   position = "0 0";
   extent = "640 480";
   minExtent = "8 2";
   visible = "1";
   maxLength = "255";

   new GuiMLTextCtrl() {
      profile = "GuiMLTextProfile";
      horizSizing = "right";
      vertSizing = "bottom";
      position = "16 366";
      extent = "34 14";
      minExtent = "8 2";
      visible = "1";
      lineSpacing = "2";
      allowColorChars = "0";
      maxChars = "-1";
      text = "Cash";
      maxBitmapHeight = "-1";
      selectable = "1";
   };
   new GuiMLTextCtrl(CRP_Cash) {
      profile = "GuiMLTextProfile";
      horizSizing = "right";
      vertSizing = "bottom";
      position = "44 367";
      extent = "64 14";
      minExtent = "8 2";
      visible = "1";
      lineSpacing = "2";
      allowColorChars = "0";
      maxChars = "-1";
      text = "$";
      maxBitmapHeight = "-1";
      selectable = "1";
   };
};
//--- OBJECT WRITE END --
And brfore you say that im stupid because the GUI was not exucuted blah blah blah:
Code: [Select]
exec("./PitroGUI.gui");

The variable dose not work.

Code: [Select]
CRP_Cash.setText("$ @ PitroRPData.getData(%data.bl_id).valueMoney");
Code: [Select]
//--- OBJECT WRITE BEGIN ---
new GuiTextCtrl(PitroGUI) {
   profile = "GuiTextProfile";
   horizSizing = "right";
   vertSizing = "bottom";
   position = "0 0";
   extent = "640 480";
   minExtent = "8 2";
   visible = "1";
   maxLength = "255";

   new GuiMLTextCtrl() {
      profile = "GuiMLTextProfile";
      horizSizing = "right";
      vertSizing = "bottom";
      position = "16 366";
      extent = "34 14";
      minExtent = "8 2";
      visible = "1";
      lineSpacing = "2";
      allowColorChars = "0";
      maxChars = "-1";
      text = "Cash";
      maxBitmapHeight = "-1";
      selectable = "1";
   };
   new GuiMLTextCtrl(CRP_Cash) {
      profile = "GuiMLTextProfile";
      horizSizing = "right";
      vertSizing = "bottom";
      position = "44 367";
      extent = "64 14";
      minExtent = "8 2";
      visible = "1";
      lineSpacing = "2";
      allowColorChars = "0";
      maxChars = "-1";
      text = "$";
      maxBitmapHeight = "-1";
      selectable = "1";
   };
};
//--- OBJECT WRITE END --
And brfore you say that im stupid because the GUI was not exucuted blah blah blah:
Code: [Select]
exec("./PitroGUI.gui");
Let me guess, it says $ @ PitroRPData.getData(%data.bl_id).valueMoney when you use it.

Let me guess, it says $ @ PitroRPData.getData(%data.bl_id).valueMoney when you use it.
This. Yes.

put a quotation mark after the $ and before the PitroRPData in that string
« Last Edit: May 23, 2010, 05:23:38 PM by Amade »

put a quotation mark after the $ and before the PitroRPData in that string
Nope.

Code: [Select]
$money = "$" @ PitroRPData.getData(%data.bl_id).valueMoney;
CRP_Cash.setText($money);


You are doing something wrong elsewhere then.

What else could i be doing wrong?

Code: [Select]
CRP_Cash.setText("$" @ PitroRPData.getData(%data.bl_id).valueMoney);
You missed the " after the $, And added a wrong one after the valueMoney.

Also, I don't know if this is needed, But maybe you need to convert it to a string?