Jump to content
UBot Underground

There is an Error In Your Code


Recommended Posts

So I just opened up a script I had save in Ubot, and it's in code view. I clicked the button to go to node view and I got an error message pop up.

 

"There is an error in your code. Please fix it before switching to node view."

 

So my question is, how do I find where the error is? Is there some way of having ubot highlight the error?

 

I am not familiar enough with ubot yet to be able to do this.

Link to post
Share on other sites

Usually they are underlined in red... if not you need to locate it yourself. One way to do that is to copy the code to a text file and paste fragments of it back in, one at a time, checking to see if node view is available each time... this should help to locate the problem.

 

http://ubotstudio.com/forum/public/style_emoticons/default/tongue.gif

Link to post
Share on other sites

Thanks for the info. I don't see anything underlined in red which means I have to check it. This is such a pain because this bot is pretty big!

Link to post
Share on other sites

You can look first for things like define nodes that are not named, empty if/then statements, etc. It is most often an incomplete command.

 

 

John

Link to post
Share on other sites

Thanks for the info. I don't see anything underlined in red which means I have to check it. This is such a pain because this bot is pretty big!

 

In these kind of situations, sometimes you need to make a backup copy and then start cutting your code in half.

 

Step 1. Save a temporary version of the code

Step 2. Find a suitable break point about half way through your code and delete half the code.

Step 3. If you still can't get to Node View find goto Step 1.

Step 4. If you can get to Node View, then reload the last temporary version and delete the other half of the code.

Step 5. Goto Step 1.

 

No matter how many lines of code you have, this approach will zero in on the problem code pretty quickly.

Link to post
Share on other sites

No matter how many lines of code you have, this approach will zero in on the problem code pretty quickly.

 

Yup That's pretty much what I did. Using dreamweaver helped because it helped me to see the formatting better than a txt file.

Link to post
Share on other sites
  • 4 weeks later...
  • 1 year later...

I appreciate this thread as it helped me figure out where the error was.

 

There was actually no error in the code I just forgot to add the plugin the code was using after I did a fresh install of the OS.

Link to post
Share on other sites
  • 4 years later...

ok i had this problem too, but i realized i had a define function with 3 inputs, i had created an alert with 3 inputs to test the function. I then modified later to have 4 inputs in the define but i left the alert with the 3 inputs calling the same define, so that was the error. But it wont show anything visual for me to check. So if anyone of you remember doing this, just go back and delete the call for the function or command with mismatch inputs. 

Link to post
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.

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.

Loading...
×
×
  • Create New...