General Category > ASL Scripts
Let's add a section for using the ASL Editor.
lppena:
I'm new to the forum and like most new users would love to see some tutorials on how to create ASL scripts using the editor. I've only begun to open existing ASL scripts, but it looks quite useful especially the syntax checker functions. Some of the scripts that I've run the checker flagged some warnings, but I don't have a clue what they mean? For example in the cog.a8s script this is displayed. What does it mean?
--- Code: ---Parsing...
Analyzing...
Warning on line 45: Assigning a value to a member of an unassigned variable "$p"
Error on line 55: int expression expected
Warning on line 57: Use of unassigned variable "$sect"
Warning on line 58: Use of unassigned variable "$sect"
Warning on line 59: Use of unassigned variable "$sect"
Warning on line 60: Use of unassigned variable "$sect"
Completed: 1 error, 5 warnings
--- End code ---
As I start working more with the editor I'll start posting FYI and possibly some how to articles as I unravel the mysteries of Anim8or and the tools associated with it. My gratitude goes out to Steve and the many helpful poster who advocate the use of Anim8or. Leroy.
Update: The first thing I've done is to install the ASL Script Editor and associate .ASL files in Windows XP to open all ASL files with the editor rather then Notepad; it's okay but a text editor lacks the Syntax Checker and should be more useful in troubleshooting ASL scripts.
Raxx:
Ok, I just looked at the script. The warnings are just warnings which shouldn't actually stop the script execution. The line 57 error I think is mostly due to the Syntax Checker not being smart enough to realize that $div will be an integer value set by the parametric script once it's run. When it's run in Anim8or there won't be any problems.
The warnings are mostly due to there not being any data assigned to the variables before they are used. There is a for loop that runs through $sect and eventually populates that variable. If before the for loop there was a line $sect=0; then that warning would go away.
lppena:
I've been checking all the scripts that I have installed; not to correct them but as a learning aid.
Are error messages more serious then warnings?
Some of the parametric scripts yield errors but seem to function normally otherwise.
How useful in the script editor to actually helping script writers fixed problems in their scripts?
Raxx:
Usually warnings in programming/scripting languages serve as just a caution that something isn't quite according to standard and that it "might" cause problems later on depending on certain circumstances.
Errors = failure in script execution. In the case of the Cog script, however, the script editor didn't differentiate between what kind of script it was, hence causing the error. Anim8or itself gives out error messages in its debug output window when compiling and executing scripts, and is the final say-so on what's an error and what's not.
The ASL Script Editor is a program written by a third party (Kubajzz), and not officially supported by Anim8or, nor has there been any contributions to it by Steve (though I'm sure he answered some of Kubajzz's questions). It's not a completely polished product so there are bound to be some bugs in it. I use it as my primary script editing tool, though I don't do much ASL work myself. There are a few quirks in there that irritates me, but it's a lot nicer than using Notepad. Basically, in my opinion, it's the best tool we have for ASL Script editing.
(Ippena, I'm curious to know if the .x script I posted in the other topic works, so that I can go ahead and put it in the database and then forget about it ;))
lppena:
I made a cube and applied a BMP texture and exported it with the modified BZII X exporter, but when I view it in 3D Exploration 1.5.5. the errors in the screen grab display in 3DEX. I'm hoping you can give me a clue on what to change to get rid of the errors in the X model outputed by the script. Leroy.
Navigation
[0] Message Index
[#] Next page
Go to full version