Can someone help me debug

I need help debuggin my script.

[code:1:0279df2b36]

here is the code:

Code:

var scrollPosition = Vector2.zero;
var numberOfMerchantAssets = 30;
var pic : Texture2D;
var items : StockItem ;

static var mx_rws = 0;

var CurrentSelection : StockItem;

function OnGUI()
{
// make the scroll area
GUI.Box (Rect (9,(Screen.height * 0.55) - 5,(Screen.width * 0.4) + 11,(Screen.height * 0.35) + 10), " ");
scrollPosition=GUI.BeginScrollView (Rect (10,(Screen.height * 0.55),(Screen.width * 0.4) + 5,(Screen.height * 0.35)), scrollPosition, Rect (0, 0, 300, 1200));
var Row : int = 0;
var Col : int = 0;

for(var i : StockItem in items)
{
if (GUI.Button(Rect ( 5 + (Col++ * 80), Row, 78, 78), i.pic))
{
CurrentSelection = i;
}
if (Col == 7)
{
Row += 80;
Col = 0;
}
}
GUI.EndScrollView();

if(CurrentSelection)
{
GUI.Box (Rect ((Screen.width * 0.645) - 12,(Screen.height * 0.1) - 10,(Screen.height * 0.35) + 20,(Screen.height * 0.35) + 10), " ");
GUI.Label(Rect ((Screen.width * 0.645),(Screen.height * 0.1) - 5,(Screen.width * 0.25) + 11,(Screen.height * 0.35)), CurrentSelection.pic);

GUI.Box (Rect ((Screen.width * 0.545) - 12,(Screen.height * 0.55) - 10,(Screen.width * 0.35) + 20,(Screen.height * 0.35) + 10), " ");
GUIContent.text (StockItem.description);

}
}

This tells me I’m unable to access static variables with this command.

I would also like it if multiple instances of the “same item” would stack.

here is the code:

Code:

var scrollPosition = Vector2.zero;
var numberOfMerchantAssets = 30;
var pic : Texture2D;
var items : StockItem ;

static var mx_rws = 0;

var CurrentSelection : StockItem;

function OnGUI()
{
// make the scroll area
GUI.Box (Rect (9,(Screen.height * 0.55) - 5,(Screen.width * 0.4) + 11,(Screen.height * 0.35) + 10), " ");
scrollPosition=GUI.BeginScrollView (Rect (10,(Screen.height * 0.55),(Screen.width * 0.4) + 5,(Screen.height * 0.35)), scrollPosition, Rect (0, 0, 300, 1200));
var Row : int = 0;
var Col : int = 0;

for(var i : StockItem in items)
{
if (GUI.Button(Rect ( 5 + (Col++ * 80), Row, 78, 78), i.pic))
{
CurrentSelection = i;
}
if (Col == 7)
{
Row += 80;
Col = 0;
}
}
GUI.EndScrollView();

if(CurrentSelection)
{
GUI.Box (Rect ((Screen.width * 0.645) - 12,(Screen.height * 0.1) - 10,(Screen.height * 0.35) + 20,(Screen.height * 0.35) + 10), " ");
GUI.Label(Rect ((Screen.width * 0.645),(Screen.height * 0.1) - 5,(Screen.width * 0.25) + 11,(Screen.height * 0.35)), CurrentSelection.pic);

GUI.Box (Rect ((Screen.width * 0.545) - 12,(Screen.height * 0.55) - 10,(Screen.width * 0.35) + 20,(Screen.height * 0.35) + 10), " ");
GUIContent.text (StockItem.description);

}
}

This tells me I’m unable to access static variables with this command.

I would also like it if multiple instances of the “same item” would stack.

here is the code:

Code:

var scrollPosition = Vector2.zero;
var numberOfMerchantAssets = 30;
var pic : Texture2D;
var items : StockItem ;

static var mx_rws = 0;

var CurrentSelection : StockItem;

function OnGUI()
{
// make the scroll area
GUI.Box (Rect (9,(Screen.height * 0.55) - 5,(Screen.width * 0.4) + 11,(Screen.height * 0.35) + 10), " ");
scrollPosition=GUI.BeginScrollView (Rect (10,(Screen.height * 0.55),(Screen.width * 0.4) + 5,(Screen.height * 0.35)), scrollPosition, Rect (0, 0, 300, 1200));
var Row : int = 0;
var Col : int = 0;

for(var i : StockItem in items)
{
if (GUI.Button(Rect ( 5 + (Col++ * 80), Row, 78, 78), i.pic))
{
CurrentSelection = i;
}
if (Col == 7)
{
Row += 80;
Col = 0;
}
}
GUI.EndScrollView();

if(CurrentSelection)
{
GUI.Box (Rect ((Screen.width * 0.645) - 12,(Screen.height * 0.1) - 10,(Screen.height * 0.35) + 20,(Screen.height * 0.35) + 10), " ");
GUI.Label(Rect ((Screen.width * 0.645),(Screen.height * 0.1) - 5,(Screen.width * 0.25) + 11,(Screen.height * 0.35)), CurrentSelection.pic);

GUI.Box (Rect ((Screen.width * 0.545) - 12,(Screen.height * 0.55) - 10,(Screen.width * 0.35) + 20,(Screen.height * 0.35) + 10), " ");
GUIContent.text (StockItem.description);

}
}

This tells me I’m unable to access static variables with this command.

I would also like it if multiple instances of the “same item” would stack.

here is the code:

Code:

var scrollPosition = Vector2.zero;
var numberOfMerchantAssets = 30;
var pic : Texture2D;
var items : StockItem ;

static var mx_rws = 0;

var CurrentSelection : StockItem;

function OnGUI()
{
// make the scroll area
GUI.Box (Rect (9,(Screen.height * 0.55) - 5,(Screen.width * 0.4) + 11,(Screen.height * 0.35) + 10), " ");
scrollPosition=GUI.BeginScrollView (Rect (10,(Screen.height * 0.55),(Screen.width * 0.4) + 5,(Screen.height * 0.35)), scrollPosition, Rect (0, 0, 300, 1200));
var Row : int = 0;
var Col : int = 0;

for(var i : StockItem in items)
{
if (GUI.Button(Rect ( 5 + (Col++ * 80), Row, 78, 78), i.pic))
{
CurrentSelection = i;
}
if (Col == 7)
{
Row += 80;
Col = 0;
}
}
GUI.EndScrollView();

if(CurrentSelection)
{
GUI.Box (Rect ((Screen.width * 0.645) - 12,(Screen.height * 0.1) - 10,(Screen.height * 0.35) + 20,(Screen.height * 0.35) + 10), " ");
GUI.Label(Rect ((Screen.width * 0.645),(Screen.height * 0.1) - 5,(Screen.width * 0.25) + 11,(Screen.height * 0.35)), CurrentSelection.pic);

GUI.Box (Rect ((Screen.width * 0.545) - 12,(Screen.height * 0.55) - 10,(Screen.width * 0.35) + 20,(Screen.height * 0.35) + 10), " ");
GUIContent.text (StockItem.description);

}
}

This tells me I’m unable to access static variables with this command.

I would also like it if multiple instances of the “same item” would stack.

here is the code:

Code:

var scrollPosition = Vector2.zero;
var numberOfMerchantAssets = 30;
var pic : Texture2D;
var items : StockItem ;

static var mx_rws = 0;

var CurrentSelection : StockItem;

function OnGUI()
{
// make the scroll area
GUI.Box (Rect (9,(Screen.height * 0.55) - 5,(Screen.width * 0.4) + 11,(Screen.height * 0.35) + 10), " ");
scrollPosition=GUI.BeginScrollView (Rect (10,(Screen.height * 0.55),(Screen.width * 0.4) + 5,(Screen.height * 0.35)), scrollPosition, Rect (0, 0, 300, 1200));
var Row : int = 0;
var Col : int = 0;

for(var i : StockItem in items)
{
if (GUI.Button(Rect ( 5 + (Col++ * 80), Row, 78, 78), i.pic))
{
CurrentSelection = i;
}
if (Col == 7)
{
Row += 80;
Col = 0;
}
}
GUI.EndScrollView();

if(CurrentSelection)
{
GUI.Box (Rect ((Screen.width * 0.645) - 12,(Screen.height * 0.1) - 10,(Screen.height * 0.35) + 20,(Screen.height * 0.35) + 10), " ");
GUI.Label(Rect ((Screen.width * 0.645),(Screen.height * 0.1) - 5,(Screen.width * 0.25) + 11,(Screen.height * 0.35)), CurrentSelection.pic);

GUI.Box (Rect ((Screen.width * 0.545) - 12,(Screen.height * 0.55) - 10,(Screen.width * 0.35) + 20,(Screen.height * 0.35) + 10), " ");
GUIContent.text (StockItem.description);

}
}

This tells me I’m unable to access static variables with this command.

I would also like it if multiple instances of the “same item” would stack.

here is the code:

Code:

var scrollPosition = Vector2.zero;
var numberOfMerchantAssets = 30;
var pic : Texture2D;
var items : StockItem ;

static var mx_rws = 0;

var CurrentSelection : StockItem;

function OnGUI()
{
// make the scroll area
GUI.Box (Rect (9,(Screen.height * 0.55) - 5,(Screen.width * 0.4) + 11,(Screen.height * 0.35) + 10), " ");
scrollPosition=GUI.BeginScrollView (Rect (10,(Screen.height * 0.55),(Screen.width * 0.4) + 5,(Screen.height * 0.35)), scrollPosition, Rect (0, 0, 300, 1200));
var Row : int = 0;
var Col : int = 0;

for(var i : StockItem in items)
{
if (GUI.Button(Rect ( 5 + (Col++ * 80), Row, 78, 78), i.pic))
{
CurrentSelection = i;
}
if (Col == 7)
{
Row += 80;
Col = 0;
}
}
GUI.EndScrollView();

if(CurrentSelection)
{
GUI.Box (Rect ((Screen.width * 0.645) - 12,(Screen.height * 0.1) - 10,(Screen.height * 0.35) + 20,(Screen.height * 0.35) + 10), " ");
GUI.Label(Rect ((Screen.width * 0.645),(Screen.height * 0.1) - 5,(Screen.width * 0.25) + 11,(Screen.height * 0.35)), CurrentSelection.pic);

GUI.Box (Rect ((Screen.width * 0.545) - 12,(Screen.height * 0.55) - 10,(Screen.width * 0.35) + 20,(Screen.height * 0.35) + 10), " ");
GUIContent.text (StockItem.description);

}
}

This tells me I’m unable to access static variables with this command.

I would also like it if multiple instances of the “same item” would stack.

here is the code:

Code:

var scrollPosition = Vector2.zero;
var numberOfMerchantAssets = 30;
var pic : Texture2D;
var items : StockItem ;

static var mx_rws = 0;

var CurrentSelection : StockItem;

function OnGUI()
{
// make the scroll area
GUI.Box (Rect (9,(Screen.height * 0.55) - 5,(Screen.width * 0.4) + 11,(Screen.height * 0.35) + 10), " ");
scrollPosition=GUI.BeginScrollView (Rect (10,(Screen.height * 0.55),(Screen.width * 0.4) + 5,(Screen.height * 0.35)), scrollPosition, Rect (0, 0, 300, 1200));
var Row : int = 0;
var Col : int = 0;

for(var i : StockItem in items)
{
if (GUI.Button(Rect ( 5 + (Col++ * 80), Row, 78, 78), i.pic))
{
CurrentSelection = i;
}
if (Col == 7)
{
Row += 80;
Col = 0;
}
}
GUI.EndScrollView();

if(CurrentSelection)
{
GUI.Box (Rect ((Screen.width * 0.645) - 12,(Screen.height * 0.1) - 10,(Screen.height * 0.35) + 20,(Screen.height * 0.35) + 10), " ");
GUI.Label(Rect ((Screen.width * 0.645),(Screen.height * 0.1) - 5,(Screen.width * 0.25) + 11,(Screen.height * 0.35)), CurrentSelection.pic);

GUI.Box (Rect ((Screen.width * 0.545) - 12,(Screen.height * 0.55) - 10,(Screen.width * 0.35) + 20,(Screen.height * 0.35) + 10), " ");
GUIContent.text (StockItem.description);

}
}

This tells me I’m unable to access static variables with this command.

I would also like it if multiple instances of the “same item” would stack.

here is the code:

Code:

var scrollPosition = Vector2.zero;
var numberOfMerchantAssets = 30;
var pic : Texture2D;
var items : StockItem ;

static var mx_rws = 0;

var CurrentSelection : StockItem;

function OnGUI()
{
// make the scroll area
GUI.Box (Rect (9,(Screen.height * 0.55) - 5,(Screen.width * 0.4) + 11,(Screen.height * 0.35) + 10), " ");
scrollPosition=GUI.BeginScrollView (Rect (10,(Screen.height * 0.55),(Screen.width * 0.4) + 5,(Screen.height * 0.35)), scrollPosition, Rect (0, 0, 300, 1200));
var Row : int = 0;
var Col : int = 0;

for(var i : StockItem in items)
{
if (GUI.Button(Rect ( 5 + (Col++ * 80), Row, 78, 78), i.pic))
{
CurrentSelection = i;
}
if (Col == 7)
{
Row += 80;
Col = 0;
}
}
GUI.EndScrollView();

if(CurrentSelection)
{
GUI.Box (Rect ((Screen.width * 0.645) - 12,(Screen.height * 0.1) - 10,(Screen.height * 0.35) + 20,(Screen.height * 0.35) + 10), " ");
GUI.Label(Rect ((Screen.width * 0.645),(Screen.height * 0.1) - 5,(Screen.width * 0.25) + 11,(Screen.height * 0.35)), CurrentSelection.pic);

GUI.Box (Rect ((Screen.width * 0.545) - 12,(Screen.height * 0.55) - 10,(Screen.width * 0.35) + 20,(Screen.height * 0.35) + 10), " ");
GUIContent.text (StockItem.description);

}
}

This tells me I’m unable to access static variables with this command.

I would also like it if multiple instances of the “same item” would stack.

here is the code:

Code:

var scrollPosition = Vector2.zero;
var numberOfMerchantAssets = 30;
var pic : Texture2D;
var items : StockItem ;

static var mx_rws = 0;

var CurrentSelection : StockItem;

function OnGUI()
{
// make the scroll area
GUI.Box (Rect (9,(Screen.height * 0.55) - 5,(Screen.width * 0.4) + 11,(Screen.height * 0.35) + 10), " ");
scrollPosition=GUI.BeginScrollView (Rect (10,(Screen.height * 0.55),(Screen.width * 0.4) + 5,(Screen.height * 0.35)), scrollPosition, Rect (0, 0, 300, 1200));
var Row : int = 0;
var Col : int = 0;

for(var i : StockItem in items)
{
if (GUI.Button(Rect ( 5 + (Col++ * 80), Row, 78, 78), i.pic))
{
CurrentSelection = i;
}
if (Col == 7)
{
Row += 80;
Col = 0;
}
}
GUI.EndScrollView();

if(CurrentSelection)
{
GUI.Box (Rect ((Screen.width * 0.645) - 12,(Screen.height * 0.1) - 10,(Screen.height * 0.35) + 20,(Screen.height * 0.35) + 10), " ");
GUI.Label(Rect ((Screen.width * 0.645),(Screen.height * 0.1) - 5,(Screen.width * 0.25) + 11,(Screen.height * 0.35)), CurrentSelection.pic);

GUI.Box (Rect ((Screen.width * 0.545) - 12,(Screen.height * 0.55) - 10,(Screen.width * 0.35) + 20,(Screen.height * 0.35) + 10), " ");
GUIContent.text (StockItem.description);

}
}

This tells me I’m unable to access static variables with this command.

I would also like it if multiple instances of the “same item” would stack.

here is the code:

Code:

var scrollPosition = Vector2.zero;
var numberOfMerchantAssets = 30;
var pic : Texture2D;
var items : StockItem ;

static var mx_rws = 0;

var CurrentSelection : StockItem;

function OnGUI()
{
// make the scroll area
GUI.Box (Rect (9,(Screen.height * 0.55) - 5,(Screen.width * 0.4) + 11,(Screen.height * 0.35) + 10), " ");
scrollPosition=GUI.BeginScrollView (Rect (10,(Screen.height * 0.55),(Screen.width * 0.4) + 5,(Screen.height * 0.35)), scrollPosition, Rect (0, 0, 300, 1200));
var Row : int = 0;
var Col : int = 0;

for(var i : StockItem in items)
{
if (GUI.Button(Rect ( 5 + (Col++ * 80), Row, 78, 78), i.pic))
{
CurrentSelection = i;
}
if (Col == 7)
{
Row += 80;
Col = 0;
}
}
GUI.EndScrollView();

if(CurrentSelection)
{
GUI.Box (Rect ((Screen.width * 0.645) - 12,(Screen.height * 0.1) - 10,(Screen.height * 0.35) + 20,(Screen.height * 0.35) + 10), " ");
GUI.Label(Rect ((Screen.width * 0.645),(Screen.height * 0.1) - 5,(Screen.width * 0.25) + 11,(Screen.height * 0.35)), CurrentSelection.pic);

GUI.Box (Rect ((Screen.width * 0.545) - 12,(Screen.height * 0.55) - 10,(Screen.width * 0.35) + 20,(Screen.height * 0.35) + 10), " ");
GUIContent.text (StockItem.description);

}
}

This tells me I’m unable to access static variables with this command.

I would also like it if multiple instances of the “same item” would stack.

here is the code:

Code:

var scrollPosition = Vector2.zero;
var numberOfMerchantAssets = 30;
var pic : Texture2D;
var items : StockItem ;

static var mx_rws = 0;

var CurrentSelection : StockItem;

function OnGUI()
{
// make the scroll area
GUI.Box (Rect (9,(Screen.height * 0.55) - 5,(Screen.width * 0.4) + 11,(Screen.height * 0.35) + 10), " ");
scrollPosition=GUI.BeginScrollView (Rect (10,(Screen.height * 0.55),(Screen.width * 0.4) + 5,(Screen.height * 0.35)), scrollPosition, Rect (0, 0, 300, 1200));
var Row : int = 0;
var Col : int = 0;

for(var i : StockItem in items)
{
if (GUI.Button(Rect ( 5 + (Col++ * 80), Row, 78, 78), i.pic))
{
CurrentSelection = i;
}
if (Col == 7)
{
Row += 80;
Col = 0;
}
}
GUI.EndScrollView();

if(CurrentSelection)
{
GUI.Box (Rect ((Screen.width * 0.645) - 12,(Screen.height * 0.1) - 10,(Screen.height * 0.35) + 20,(Screen.height * 0.35) + 10), " ");
GUI.Label(Rect ((Screen.width * 0.645),(Screen.height * 0.1) - 5,(Screen.width * 0.25) + 11,(Screen.height * 0.35)), CurrentSelection.pic);

GUI.Box (Rect ((Screen.width * 0.545) - 12,(Screen.height * 0.55) - 10,(Screen.width * 0.35) + 20,(Screen.height * 0.35) + 10), " ");
GUIContent.text (StockItem.description);

}
}

This tells me I’m unable to access static variables with this command.

I would also like it if multiple instances of the “same item” would stack.

here is the code:

Code:

var scrollPosition = Vector2.zero;
var numberOfMerchantAssets = 30;
var pic : Texture2D;
var items : StockItem ;

static var mx_rws = 0;

var CurrentSelection : StockItem;

function OnGUI()
{
// make the scroll area
GUI.Box (Rect (9,(Screen.height * 0.55) - 5,(Screen.width * 0.4) + 11,(Screen.height * 0.35) + 10), " ");
scrollPosition=GUI.BeginScrollView (Rect (10,(Screen.height * 0.55),(Screen.width * 0.4) + 5,(Screen.height * 0.35)), scrollPosition, Rect (0, 0, 300, 1200));
var Row : int = 0;
var Col : int = 0;

for(var i : StockItem in items)
{
if (GUI.Button(Rect ( 5 + (Col++ * 80), Row, 78, 78), i.pic))
{
CurrentSelection = i;
}
if (Col == 7)
{
Row += 80;
Col = 0;
}
}
GUI.EndScrollView();

if(CurrentSelection)
{
GUI.Box (Rect ((Screen.width * 0.645) - 12,(Screen.height * 0.1) - 10,(Screen.height * 0.35) + 20,(Screen.height * 0.35) + 10), " ");
GUI.Label(Rect ((Screen.width * 0.645),(Screen.height * 0.1) - 5,(Screen.width * 0.25) + 11,(Screen.height * 0.35)), CurrentSelection.pic);

GUI.Box (Rect ((Screen.width * 0.545) - 12,(Screen.height * 0.55) - 10,(Screen.width * 0.35) + 20,(Screen.height * 0.35) + 10), " ");
GUIContent.text (StockItem.description);

}
}

This tells me I’m unable to access static variables with this command.

I would also like it if multiple instances of the “same item” would stack.

here is the code:

Code:

var scrollPosition = Vector2.zero;
var numberOfMerchantAssets = 30;
var pic : Texture2D;
var items : StockItem ;

static var mx_rws = 0;

var CurrentSelection : StockItem;

function OnGUI()
{
// make the scroll area
GUI.Box (Rect (9,(Screen.height * 0.55) - 5,(Screen.width * 0.4) + 11,(Screen.height * 0.35) + 10), " ");
scrollPosition=GUI.BeginScrollView (Rect (10,(Screen.height * 0.55),(Screen.width * 0.4) + 5,(Screen.height * 0.35)), scrollPosition, Rect (0, 0, 300, 1200));
var Row : int = 0;
var Col : int = 0;

for(var i : StockItem in items)
{
if (GUI.Button(Rect ( 5 + (Col++ * 80), Row, 78, 78), i.pic))
{
CurrentSelection = i;
}
if (Col == 7)
{
Row += 80;
Col = 0;
}
}
GUI.EndScrollView();

if(CurrentSelection)
{
GUI.Box (Rect ((Screen.width * 0.645) - 12,(Screen.height * 0.1) - 10,(Screen.height * 0.35) + 20,(Screen.height * 0.35) + 10), " ");
GUI.Label(Rect ((Screen.width * 0.645),(Screen.height * 0.1) - 5,(Screen.width * 0.25) + 11,(Screen.height * 0.35)), CurrentSelection.pic);

GUI.Box (Rect ((Screen.width * 0.545) - 12,(Screen.height * 0.55) - 10,(Screen.width * 0.35) + 20,(Screen.height * 0.35) + 10), " ");
GUIContent.text (StockItem.description);

}
}

This tells me I’m unable to access static variables with this command.

I would also like it if multiple instances of the “same item” would stack.

here is the code:

Code:

var scrollPosition = Vector2.zero;
var numberOfMerchantAssets = 30;
var pic : Texture2D;
var items : StockItem ;

static var mx_rws = 0;

var CurrentSelection : StockItem;

function OnGUI()
{
// make the scroll area
GUI.Box (Rect (9,(Screen.height * 0.55) - 5,(Screen.width * 0.4) + 11,(Screen.height * 0.35) + 10), " ");
scrollPosition=GUI.BeginScrollView (Rect (10,(Screen.height * 0.55),(Screen.width * 0.4) + 5,(Screen.height * 0.35)), scrollPosition, Rect (0, 0, 300, 1200));
var Row : int = 0;
var Col : int = 0;

for(var i : StockItem in items)
{
if (GUI.Button(Rect ( 5 + (Col++ * 80), Row, 78, 78), i.pic))
{
CurrentSelection = i;
}
if (Col == 7)
{
Row += 80;
Col = 0;
}
}
GUI.EndScrollView();

if(CurrentSelection)
{
GUI.Box (Rect ((Screen.width * 0.645) - 12,(Screen.height * 0.1) - 10,(Screen.height * 0.35) + 20,(Screen.height * 0.35) + 10), " ");
GUI.Label(Rect ((Screen.width * 0.645),(Screen.height * 0.1) - 5,(Screen.width * 0.25) + 11,(Screen.height * 0.35)), CurrentSelection.pic);

GUI.Box (Rect ((Screen.width * 0.545) - 12,(Screen.height * 0.55) - 10,(Screen.width * 0.35) + 20,(Screen.height * 0.35) + 10), " ");
GUIContent.text (StockItem.description);

}
}

This tells me I’m unable to access static variables with this command.

I would also like it if multiple instances of the “same item” would stack.

here is the code:

Code:

var scrollPosition = Vector2.zero;
var numberOfMerchantAssets = 30;
var pic : Texture2D;
var items : StockItem ;

static var mx_rws = 0;

var CurrentSelection : StockItem;

function OnGUI()
{
// make the scroll area
GUI.Box (Rect (9,(Screen.height * 0.55) - 5,(Screen.width * 0.4) + 11,(Screen.height * 0.35) + 10), " ");
scrollPosition=GUI.BeginScrollView (Rect (10,(Screen.height * 0.55),(Screen.width * 0.4) + 5,(Screen.height * 0.35)), scrollPosition, Rect (0, 0, 300, 1200));
var Row : int = 0;
var Col : int = 0;

for(var i : StockItem in items)
{
if (GUI.Button(Rect ( 5 + (Col++ * 80), Row, 78, 78), i.pic))
{
CurrentSelection = i;
}
if (Col == 7)
{
Row += 80;
Col = 0;
}
}
GUI.EndScrollView();

if(CurrentSelection)
{
GUI.Box (Rect ((Screen.width * 0.645) - 12,(Screen.height * 0.1) - 10,(Screen.height * 0.35) + 20,(Screen.height * 0.35) + 10), " ");
GUI.Label(Rect ((Screen.width * 0.645),(Screen.height * 0.1) - 5,(Screen.width * 0.25) + 11,(Screen.height * 0.35)), CurrentSelection.pic);

GUI.Box (Rect ((Screen.width * 0.545) - 12,(Screen.height * 0.55) - 10,(Screen.width * 0.35) + 20,(Screen.height * 0.35) + 10), " ");
GUIContent.text (StockItem.description);

}
}

This tells me I’m unable to access static variables with this command.

I would also like it if multiple instances of the “same item” would stack.

here is the code:

Code:

var scrollPosition = Vector2.zero;
var numberOfMerchantAssets = 30;
var pic : Texture2D;
var items : StockItem ;

static var mx_rws = 0;

var CurrentSelection : StockItem;

function OnGUI()
{
// make the scroll area
GUI.Box (Rect (9,(Screen.height * 0.55) - 5,(Screen.width * 0.4) + 11,(Screen.height * 0.35) + 10), " ");
scrollPosition=GUI.BeginScrollView (Rect (10,(Screen.height * 0.55),(Screen.width * 0.4) + 5,(Screen.height * 0.35)), scrollPosition, Rect (0, 0, 300, 1200));
var Row : int = 0;
var Col : int = 0;

for(var i : StockItem in items)
{
if (GUI.Button(Rect ( 5 + (Col++ * 80), Row, 78, 78), i.pic))
{
CurrentSelection = i;
}
if (Col == 7)
{
Row += 80;
Col = 0;
}
}
GUI.EndScrollView();

if(CurrentSelection)
{
GUI.Box (Rect ((Screen.width * 0.645) - 12,(Screen.height * 0.1) - 10,(Screen.height * 0.35) + 20,(Screen.height * 0.35) + 10), " ");
GUI.Label(Rect ((Screen.width * 0.645),(Screen.height * 0.1) - 5,(Screen.width * 0.25) + 11,(Screen.height * 0.35)), CurrentSelection.pic);

GUI.Box (Rect ((Screen.width * 0.545) - 12,(Screen.height * 0.55) - 10,(Screen.width * 0.35) + 20,(Screen.height * 0.35) + 10), " ");
GUIContent.text (StockItem.description);

}
}

This tells me I’m unable to access static variables with this command.

I would also like it if multiple instances of the “same item” would stack.

here is the code:

Code:

var scrollPosition = Vector2.zero;
var numberOfMerchantAssets = 30;
var pic : Texture2D;
var items : StockItem ;

static var mx_rws = 0;

var CurrentSelection : StockItem;

function OnGUI()
{
// make the scroll area
GUI.Box (Rect (9,(Screen.height * 0.55) - 5,(Screen.width * 0.4) + 11,(Screen.height * 0.35) + 10), " ");
scrollPosition=GUI.BeginScrollView (Rect (10,(Screen.height * 0.55),(Screen.width * 0.4) + 5,(Screen.height * 0.35)), scrollPosition, Rect (0, 0, 300, 1200));
var Row : int = 0;
var Col : int = 0;

for(var i : StockItem in items)
{
if (GUI.Button(Rect ( 5 + (Col++ * 80), Row, 78, 78), i.pic))
{
CurrentSelection = i;
}
if (Col == 7)
{
Row += 80;
Col = 0;
}
}
GUI.EndScrollView();

if(CurrentSelection)
{
GUI.Box (Rect ((Screen.width * 0.645) - 12,(Screen.height * 0.1) - 10,(Screen.height * 0.35) + 20,(Screen.height * 0.35) + 10), " ");
GUI.Label(Rect ((Screen.width * 0.645),(Screen.height

Hehe…looks like you had a little formatting mishap :slight_smile: Try editing your post and reposting the code using ‘code’ tags. (Also, be sure to tell us what the actual problem is so that we’ll know what we’re looking for.)

ok, done… its looks just how I typed it.

What browser are you using? It’s still messed up here, and I checked it on Safari, Firefox, and Internet Explorer.

Who knows though - maybe it’s just me…

No, it’s definitely complete garbage. tatelax created another thread recently that was a similar hunk of rubbish. Maybe it’s only for people whose names are pronounced “Jess Eee” though. :stuck_out_tongue:

And you know why? Because these forums could use a little bit of fun now and then
:smile:

But yes it was a joke lol.

Well maybe its Fun, maybe its Not!
Personally I think its wrong use of some one else’s time and energy when they are trying to help.

Kind regards, Robert

ok then.