Jump to content

A compiled script


Connor H-J

Recommended Posts

I tried to do scripting for dummies guide I made a script half done it came up with a message so I deleted the script but now it came up with enother error message so I changed the script to

Begin my_first_script

 

end

 

and now it says script is now compiled what does that mean?

Link to comment
Share on other sites

When it says the script is compiled, it means that it's saved and free of errors that the TES can find. Just know that it might have a logic error (human error) somewhere in it that causes it to not work right. Usually, whether or not a script compiles or not is the first clue as to whether or not it works.

 

-Arturun

Link to comment
Share on other sites

Basically arturun has it right but here is a more detailed breakdown of how it works.

when you write a script it has to follow certian rules if you don't TES won't let you save it. For example if you start and IF statement and dont have an ENDIF associated with it.

 

Once it is compiled it means that the script should run with out any computer errors. Now logic or conflict errors are another story for example below

 

Begin my_first_script

 

short number

return

 

if (number ==2)

messagebox "number equals 2"

else if

set number to 2

endif

 

end

in this example you are testing to see if number is equal to 2. if it is not you want to set it to 2.

the problem is the script will never get to the if statement becasue of the return after you declare you variable.

 

This is the kind of error that compiling the script will not catch.

 

there are also ways to get the computer stuck in a loop

The best way to fix these errors is to logically work through the script before you try it (by that I mean pretend you are the computer and you have to execute the script). there is always trial and error though.

 

Hope this explains things. if I am wrong on any of this feel free to correct me.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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