Jump to content

Error Using GUI [Client Crashing]


debug

Recommended Posts

You are creating new instances of those actions every loop ...

Should only create one instance of it, best way to do this is in the onStart() method..

After that you can actually run those instances int he onLoop :)

I was just following this tutorial: http://osbot.org/forum/topic/58775-a-beginners-guide-to-writing-osbot-scripts-where-to-get-started-by-apaec/

Link to comment
Share on other sites

 

Ya I see, but this part is really poor

switch (state) {
            case CHOP:
                new Chop(this);
                break;
            case DROP:
                new Drop(this);
                break;
            case IN_COMBAT:
                new InCombat(this);
            default:
                break;
        }

bascily every 50 milliseconds you are making a new instance of Chop()...

Why not create one ion onstart() and just do chop.run(); in your switch statement?

 

Atleast that would solve the huge memory usage here :)

  • Like 1
Link to comment
Share on other sites

雅我明白了,但这部分是真穷

开关(州){
            案例CHOP:
                新的印章(本);
                打破;
            这样滴:
                新的投递(本);
                打破;
            案例IN_COMBAT:
                新InCombat(本);
            默认:
                打破;
        }

bascily每隔50毫秒要制作印章的新实例()...

为什么不创建一个离子的OnStart()和刚做chop.run(); 在switch语句?

 

ATLEAST这将解决这里巨大的内存使用情况 smile.png

If you are able to speak to express a simple code (adhesive out),, for a foreigner like me, is a blessing. I have been watching the code changes to understand the function and role. In other words I used Google translation to see your comments, it seems very important, I think I should go to correct my code, but because of the translation, to see a few times I could not understand, I should specify how changes (in should be added or modified local add comments, it would be great)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...