Jump to content
UBot Underground

Do commands return true?


Recommended Posts

Hi.

 

Does a command like "create table from file" automatically returns a True? So that I can use it in an IF?

 

if

create table from file

then

bla1

else

bla2

 

 

Thanks

Dan

 

 

Yes, it returns true no matter what.

Link to post
Share on other sites

but it will return False if the File used within "create table from file" doesn't exist?

How are you getting a return value from this command?

 

If you set a variable to the table in the "create table from file" command, it will contain nothing if the file does not exist, and Ubot will throw an error.

 

See the discussion here on possible solutions to return values and error/exception handling:

http://ubotstudio.com/forum/index.php?/topic/5338-exception-handling/

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...