Yea, I am not sure how it isn't.. The object does exist, the functions work. I just have no idea what is going on.
function uRPGTabs_Shop_ItemSet::AddShopItem(%this,%image,%name,%cost,%description)
{
if(%image $= "")
%image = "base/client/ui/brickicons/Unknown";
%strName = strReplace(%name," ","_");
if(isObject("uRPGShopItem_" @ %strName))
return;
if(%image.doColorShift == 1)
{
%csc = %image.colorShiftColor;
%color = mFloatLength((getWord(%csc,0) * 255),0)
SPC mFloatLength((getWord(%csc,1) * 255),0)
SPC mFloatLength((getWord(%csc,2) * 255),0)
SPC mFloatLength((getWord(%csc,3) * 255),0);
}
else
%color = "255 255 255 255";
%object = new GuiSwatchCtrl("uRPGShopItem_" @ %strName)
{
profile = "GuiDefaultProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "188 171";
extent = "272" SPC getWord(uRPGTabs_Shop_ItemSet.extent,1);
minExtent = "8 2";
enabled = "1";
visible = "1";
clipToParent = "1";
color = "0 0 0 100";
new GuiBitmapCtrl("uRPGShopItem_Picture_" @ %strName)
{
profile = "GuiDefaultProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "0 0";
extent = "100 100";
minExtent = "8 2";
enabled = "1";
visible = "1";
clipToParent = "1";
wrap = "0";
lockAspectRatio = "0";
alignLeft = "0";
alignTop = "0";
overflowImage = "0";
bitmap = %image.iconName;
keepCached = "0";
mColor = %color;
mMultiply = "0";
};
new GuiMLTextCtrl("uRPGShopItem_Name_" @ %strName)
{
profile = "BlockChatChannelSize3Profile";
horizSizing = "right";
vertSizing = "bottom";
position = "105 0";
extent = "149 22";
minExtent = "8 2";
enabled = "1";
visible = "1";
clipToParent = "1";
lineSpacing = "2";
allowColorChars = "0";
maxChars = "-1";
text = "<just:center>" @ %name;
maxBitmapHeight = "-1";
selectable = "1";
autoResize = "1";
};
new GuiMLTextCtrl("uRPGShopItem_Cost_" @ %strName)
{
profile = "BlockChatChannelSize3Profile";
horizSizing = "right";
vertSizing = "bottom";
position = "105 40";
extent = "149 22";
minExtent = "8 2";
enabled = "1";
visible = "1";
clipToParent = "1";
lineSpacing = "2";
allowColorChars = "0";
maxChars = "-1";
text = "<just:center>Cost: " @ %cost @ " Gold";
maxBitmapHeight = "-1";
selectable = "1";
autoResize = "1";
};
new GuiMLTextCtrl("uRPGShopItem_Description_" @ %strName)
{
profile = "BlockChatChannelSize3Profile";
horizSizing = "right";
vertSizing = "bottom";
position = "105 70";
extent = "150 62";
minExtent = "150 62";
enabled = "1";
visible = "1";
clipToParent = "1";
lineSpacing = "2";
allowColorChars = "0";
maxChars = "-1";
text = "<just:center>" @ %description;
maxBitmapHeight = "-1";
selectable = "1";
autoResize = "1";
};
new GuiBitmapButtonCtrl("uRPGShopItem_Buy_" @ %strName)
{
profile = "BlockButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "0 108";
extent = "100 22";
minExtent = "8 2";
enabled = "1";
command = "commandToServer(\'uRPG_Buy\'," @ %name @ ");";
visible = "1";
clipToParent = "1";
text = "Buy";
groupNum = "-1";
buttonType = "PushButton";
bitmap = "base/client/ui/button1";
lockAspectRatio = "0";
alignLeft = "0";
alignTop = "0";
overflowImage = "0";
mKeepCached = "0";
mColor = "255 255 255 255";
};
};
uRPGTabs_Shop_ItemSet.add(%object);
%object.setVisible(1);
uRPGTabs_Shop_ItemSet.extent = getWord(uRPGTabs_Shop_ItemSet.extent,0) SPC getWord(uRPGTabs_Shop_ItemSet.extent,1)+140;
}