Cyber Syndicate
<center><p style='font-size:120%;'><strong>Welcome to Cyber Syndicate!<strong></p>

You are visiting as a guest; please <strong>register</strong> or <strong>log in</strong>.

Being logged in provides many benefits, including access to the useful <strong>Methods forum</strong>, posting permissions, and voting permissions.

<strong>Enjoy.</strong></center>
Cyber Syndicate
<center><p style='font-size:120%;'><strong>Welcome to Cyber Syndicate!<strong></p>

You are visiting as a guest; please <strong>register</strong> or <strong>log in</strong>.

Being logged in provides many benefits, including access to the useful <strong>Methods forum</strong>, posting permissions, and voting permissions.

<strong>Enjoy.</strong></center>
Cyber Syndicate
Would you like to react to this message? Create an account in a few clicks or log in to continue.



 
HomeLatest imagesRegisterLog in

 

 Lots of errors

Go down 
3 posters
AuthorMessage
Remo
Member
Member



Posts : 41
Join date : 2011-03-10

Lots of errors Empty
PostSubject: Lots of errors   Lots of errors Icon_minitimeFri Mar 11, 2011 2:59 pm

So I'm not so used to RSBuddy scripting, more for Powerbot. When I run my script with -dev, I get these errors:

Lots of errors Boterror

My code is available here.
Back to top Go down
b0xb0x
Administrator
Administrator



Posts : 130
Join date : 2011-02-25
Age : 28
Location : California

Lots of errors Empty
PostSubject: Re: Lots of errors   Lots of errors Icon_minitimeFri Mar 11, 2011 3:03 pm

Usually the top error will contain a line of your script which has a problem.
One thing I noticed looking at your onStart method was that you call your GUI twice.
Back to top Go down
https://cybersyndicate.forumotion.com
Remo
Member
Member



Posts : 41
Join date : 2011-03-10

Lots of errors Empty
PostSubject: Re: Lots of errors   Lots of errors Icon_minitimeFri Mar 11, 2011 3:11 pm

b0xb0x wrote:
Usually the top error will contain a line of your script which has a problem.
One thing I noticed looking at your onStart method was that you call your GUI twice.
Yes, that worked. Thanks!!!
Back to top Go down
Remo
Member
Member



Posts : 41
Join date : 2011-03-10

Lots of errors Empty
PostSubject: Re: Lots of errors   Lots of errors Icon_minitimeFri Mar 11, 2011 5:17 pm

b0xb0x wrote:
Usually the top error will contain a line of your script which has a problem.
One thing I noticed looking at your onStart method was that you call your GUI twice.
That worked, but when I run it, it shows my GUI. Then, I hit "Begin", and the GUI shows up again. I hit "Begin" once more and RSBuddy closes.
Back to top Go down
b0xb0x
Administrator
Administrator



Posts : 130
Join date : 2011-02-25
Age : 28
Location : California

Lots of errors Empty
PostSubject: Re: Lots of errors   Lots of errors Icon_minitimeFri Mar 11, 2011 5:19 pm

Remo wrote:
b0xb0x wrote:
Usually the top error will contain a line of your script which has a problem.
One thing I noticed looking at your onStart method was that you call your GUI twice.
That worked, but when I run it, it shows my GUI. Then, I hit "Begin", and the GUI shows up again. I hit "Begin" once more and RSBuddy closes.

Hmm. Post your code.
Back to top Go down
https://cybersyndicate.forumotion.com
Remo
Member
Member



Posts : 41
Join date : 2011-03-10

Lots of errors Empty
PostSubject: Re: Lots of errors   Lots of errors Icon_minitimeFri Mar 11, 2011 5:26 pm

Remo wrote:
So I'm not so used to RSBuddy scripting, more for Powerbot. When I run my script with -dev, I get these errors:

Lots of errors Boterror

My code is available here.
There's my code. I've tried changing the startButton actionPerformed to this.dispose();, System.exit(0);, dispose();, none work.
Back to top Go down
b0xb0x
Administrator
Administrator



Posts : 130
Join date : 2011-02-25
Age : 28
Location : California

Lots of errors Empty
PostSubject: Re: Lots of errors   Lots of errors Icon_minitimeFri Mar 11, 2011 5:41 pm

You are initializing the GUI twice. Remove your second GUI call. Once you do that, try it again.
Back to top Go down
https://cybersyndicate.forumotion.com
Remo
Member
Member



Posts : 41
Join date : 2011-03-10

Lots of errors Empty
PostSubject: Re: Lots of errors   Lots of errors Icon_minitimeFri Mar 11, 2011 5:51 pm

b0xb0x wrote:
You are initializing the GUI twice. Remove your second GUI call. Once you do that, try it again.
The GUI appears once, though when I click begin it just closes.
Back to top Go down
b0xb0x
Administrator
Administrator



Posts : 130
Join date : 2011-02-25
Age : 28
Location : California

Lots of errors Empty
PostSubject: Re: Lots of errors   Lots of errors Icon_minitimeFri Mar 11, 2011 6:41 pm

Remo wrote:
b0xb0x wrote:
You are initializing the GUI twice. Remove your second GUI call. Once you do that, try it again.
The GUI appears once, though when I click begin it just closes.

Oh. Change this.dispose() to dispose(). By adding "this", you are disposing the whole class, therefore disposing the client GUI as well.
Back to top Go down
https://cybersyndicate.forumotion.com
Remo
Member
Member



Posts : 41
Join date : 2011-03-10

Lots of errors Empty
PostSubject: Re: Lots of errors   Lots of errors Icon_minitimeFri Mar 11, 2011 6:43 pm

b0xb0x wrote:
Remo wrote:
b0xb0x wrote:
You are initializing the GUI twice. Remove your second GUI call. Once you do that, try it again.
The GUI appears once, though when I click begin it just closes.

Oh. Change this.dispose() to dispose(). By adding "this", you are disposing the whole class, therefore disposing the client GUI as well.
Did that, the same happens.
Back to top Go down
b0xb0x
Administrator
Administrator



Posts : 130
Join date : 2011-02-25
Age : 28
Location : California

Lots of errors Empty
PostSubject: Re: Lots of errors   Lots of errors Icon_minitimeFri Mar 11, 2011 6:51 pm

Do some debugging; add a log("t"); to the start of your loop so we know if it gets to the loop or not. If it gets to your loop, my guess is that you are terminating the JVM with System.exit(0). An alternative to this would be stop(), as that stops the script rather than terminating the JVM.
Back to top Go down
https://cybersyndicate.forumotion.com
Remo
Member
Member



Posts : 41
Join date : 2011-03-10

Lots of errors Empty
PostSubject: Re: Lots of errors   Lots of errors Icon_minitimeFri Mar 11, 2011 7:42 pm

b0xb0x wrote:
Do some debugging; add a log("t"); to the start of your loop so we know if it gets to the loop or not. If it gets to your loop, my guess is that you are terminating the JVM with System.exit(0). An alternative to this would be stop(), as that stops the script rather than terminating the JVM.
I think the only thing I need help with is programming the start button. I just need the method to use and maybe then I wouldn't screw up so much.
Back to top Go down
b0xb0x
Administrator
Administrator



Posts : 130
Join date : 2011-02-25
Age : 28
Location : California

Lots of errors Empty
PostSubject: Re: Lots of errors   Lots of errors Icon_minitimeFri Mar 11, 2011 8:20 pm

Add a setVisible(false) before this.dispose(). Maybe that will work if the above didn't.
Back to top Go down
https://cybersyndicate.forumotion.com
Remo
Member
Member



Posts : 41
Join date : 2011-03-10

Lots of errors Empty
PostSubject: Re: Lots of errors   Lots of errors Icon_minitimeSat Mar 12, 2011 5:14 am

b0xb0x wrote:
Add a setVisible(false) before this.dispose(). Maybe that will work if the above didn't.
Alright, let me try that...
Back to top Go down
Remo
Member
Member



Posts : 41
Join date : 2011-03-10

Lots of errors Empty
PostSubject: Re: Lots of errors   Lots of errors Icon_minitimeSat Mar 12, 2011 5:36 am

Back to top Go down
b0xb0x
Administrator
Administrator



Posts : 130
Join date : 2011-02-25
Age : 28
Location : California

Lots of errors Empty
PostSubject: Re: Lots of errors   Lots of errors Icon_minitimeSat Mar 12, 2011 5:47 am

Remo wrote:
Here's my new code, same problem persists.

When you run it, does it log t?
Back to top Go down
https://cybersyndicate.forumotion.com
Remo
Member
Member



Posts : 41
Join date : 2011-03-10

Lots of errors Empty
PostSubject: Re: Lots of errors   Lots of errors Icon_minitimeSat Mar 12, 2011 8:17 am

b0xb0x wrote:
Remo wrote:
Here's my new code, same problem persists.

When you run it, does it log t?
No, so maybe it's a problem in the loop.
Back to top Go down
b0xb0x
Administrator
Administrator



Posts : 130
Join date : 2011-02-25
Age : 28
Location : California

Lots of errors Empty
PostSubject: Re: Lots of errors   Lots of errors Icon_minitimeSat Mar 12, 2011 8:51 am

Remo wrote:
No, so maybe it's a problem in the loop.

Since it never gets to log("t");, the onStart() does not complete.

You can remove the main from your GUI class.
Back to top Go down
https://cybersyndicate.forumotion.com
TaffTech
Administrator
Administrator



Posts : 72
Join date : 2011-02-27

Lots of errors Empty
PostSubject: Re: Lots of errors   Lots of errors Icon_minitimeSat Mar 12, 2011 4:23 pm

I don't know if this will fix it or not. But I remove this from my GUIs
Code:

 public void main(String args[]) {
           java.awt.EventQueue.invokeLater(new Runnable() {
               public void run() {
                   new AirRC().setVisible(true);
               }
           });
       }
Back to top Go down
Remo
Member
Member



Posts : 41
Join date : 2011-03-10

Lots of errors Empty
PostSubject: Re: Lots of errors   Lots of errors Icon_minitimeSun Mar 13, 2011 6:28 am

TaffTech wrote:
I don't know if this will fix it or not. But I remove this from my GUIs
Code:

 public void main(String args[]) {
           java.awt.EventQueue.invokeLater(new Runnable() {
               public void run() {
                   new AirRC().setVisible(true);
               }
           });
       }

Yeah, b0xb0x told me that. Do you think this code will work?
Back to top Go down
b0xb0x
Administrator
Administrator



Posts : 130
Join date : 2011-02-25
Age : 28
Location : California

Lots of errors Empty
PostSubject: Re: Lots of errors   Lots of errors Icon_minitimeSun Mar 13, 2011 8:54 am

Hmm, idk, try it Smile
By the way you have no mouse being drawn, just a new instance of Graphics being rotated constantly :P
Back to top Go down
https://cybersyndicate.forumotion.com
Remo
Member
Member



Posts : 41
Join date : 2011-03-10

Lots of errors Empty
PostSubject: Re: Lots of errors   Lots of errors Icon_minitimeSun Mar 13, 2011 1:44 pm

b0xb0x wrote:
Hmm, idk, try it Smile
By the way you have no mouse being drawn, just a new instance of Graphics being rotated constantly :P

I fixed that, yet the script still won't work.

How am I supposed to get to scripting if I can't? tongue
Back to top Go down
Sponsored content





Lots of errors Empty
PostSubject: Re: Lots of errors   Lots of errors Icon_minitime

Back to top Go down
 
Lots of errors
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Cyber Syndicate :: Development :: Scripting Help-
Jump to: