RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Arrays and Buttons

Nova

Wanderer
Arrays and Buttons

The following text might be a bit strange, because I'm not so good in english, but I hope some of you will understand this.

Ok here is the Situation:
I have those arrays
string[] z1 = new string[] {"Clumsy","Agility"};
string[] i1 = new string[] {"0x8C0","0x8C8"}; //the images from the spellbook

now I have a Gump with three buttons and a label
First two Buttons should make the user able to switch from Clumsy to Agility and back.
The third Button should be displayed with the image of the spellbook belonging to the spell which is shown at the moment.

The Question: How does this work ?

the Code

[code:1]AddButton( 120, 490, i1[1], i1[1], 0, GumpButtonType.Page, 1 );[/code:1]
does not work, and this code
[code:1]AddLabel( 155, 493, 0, z1[1] );[/code:1]
neither does

Second problem...
how can I tell the first two buttons that they switch a variable so I can use z1[ circle ] for example

Nova
 
Top