Page 2 of 2
Re: Sandbox Start Program
Posted: May 26th, 2010, 3:31 pm
by Runescapedj
I´m not good at coding but maybe you need money first=
If this isn´t what you wanted you should ask Arc, because he knows much more coding than me
Re: Sandbox Start Program
Posted: May 26th, 2010, 3:44 pm
by AndyLangel

naa, something with my trade tab code is messed up- the actual purchasing of things works 100%, but that second tab doesn't show. But hopefully Arc reads this post

otherwise ill just probably forget about this code

Re: Sandbox Start Program
Posted: May 26th, 2010, 7:28 pm
by arcones
With your tab code? As in, the tab for the diff buttons aren't working?
Maybe you don't have
Code: Select all
newgui (Trade)
showgui Trade //can't remember if that's 100% correct, but that might be missing. You're opening a new tab and thence a new gui...
Re: Sandbox Start Program
Posted: May 26th, 2010, 7:36 pm
by AndyLangel
Hmm, not sure- i guess i need to just look into the guitab usage a little more. Though, i am currently rewriting my old system, and the new one should be 110% better, also- your coding is a tad bit rusty.
As i have learned, a new tab would be given as such: (Keep in mind i've only been using sandbox for a little over 24 hours, i could be wrong)
Code: Select all
level_trigger_1 = [showgui ExampleGUI]
newgui ExampleGUI [
guitext "This is the first GUI tab."
guitab "Tab 2" [
guitext "not quite sure if this would work, but you can try..."
//or maybe you have to put:
showgui GUI2
]
]
//Code for GUI2
I don't yet know how data enrty goes for tabs yet- BUT i have learned that for showgui, you must have it ALONE (at least inside a gui menu) and not encased in () or [], the doing so will render it useless.
Though, i will take a look into it tonight, and with any luck i can add it to my improved show script

Re: Sandbox Start Program
Posted: May 26th, 2010, 8:07 pm
by Hirato
guitab only accepts one argument, not two
Code: Select all
guitab "My Tab"
guitext "ZOMG TEXT!!!!"
guibutton "I like cats" "echo so do I!"
Re: Sandbox Start Program
Posted: May 26th, 2010, 9:29 pm
by AndyLangel
Hirato wrote:guitab only accepts one argument, not two
Code: Select all
guitab "My Tab"
guitext "ZOMG TEXT!!!!"
guibutton "I like cats" "echo so do I!"
Ohh... So everything under a tab declaration is put into the tab? Hmm... ill try it out, Thanks!
Yeah, couldn't get it to work >.< also, know how to use guistayopen?
Re: Sandbox Start Program
Posted: May 28th, 2010, 3:57 pm
by arcones
I guess that would make sense... I'm totally gonna brush up on CS now...
So.....
Code: Select all
guitab "Trade" [
guilist [
guibutton "Iron Ore: 1gp" [
if ( >= $ironore 1) [
ironore = ( - $ironore 1)
gold = ( + $gold 1)
echo "You sold 1 iron ore for 1 gold."
]
if ( < $ironore 1) [
echo "You don't have any iron ore to sell!"
]
]
guibutton "Iron Bar: 3gp" [
if ( >= $ironbar 1) [
ironbar = ( - $ironbar 1)
gold = ( + $ gold 3)
echo "You sold 1 iron bar for 3 gold."
]
if ( < $ironbar 1) [
echo "You don't have any iron bar to sell!."
]
]
guibutton "Sword: 15gp" [
if ( >= $sword 1) [
sword = ( - $sword 1)
gold = ( + $gold 15)
echo "You sold 1 sword for 15 gold."
]
if ( < $sword 1) [
echo "You don't have any sword to sell!"
]
]
]
]
Won't work because... it'll only allow just some text or a button? Not an entire list? (Am I following?

)
Re: Sandbox Start Program
Posted: June 7th, 2010, 3:39 pm
by Leo_V117
.... By the looks of things you guys are trying to get guitabs working. Correct? If so... Its this:
Code: Select all
newgui Example [
guitext "this is some text"
guitext "see how it works?"
guitab Tab 2
guitext "more text"