Author Topic: Questions and Answers - ScriptUO specific  (Read 20274 times)

0 Members and 1 Guest are viewing this topic.

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13123
  • Activity:
    2.2%
  • Reputation Power: 152
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1339
  • Referrals: 32
    • View Profile
    • ScriptUO
Questions and Answers - ScriptUO specific
« on: July 13, 2008, 06:30:57 AM »
+1
Q: How can I run a script with SUO?

A: You can't.  The Alpha/Beta release is intended for script development only.
------------------
Q: Why does my code indent waaay to the right after I select "Tools/Auto Indent Script"?

A: Chances are you still have syntax errors in your code (either nested subs without returns, or brace imbalances). Sometimes it's really hard to find these kinds of errors, so it's actually useful to run an auto indent when you suspect you have one of these errors because you can physically see where the script starts to indent incorrectly and this location is normally where you have a problem.  Fix the error and re-auto indent and you should have pretty code again.
------------------
Q: I don't like your auto indention style.

A: Well, I've always used Allman style indention for just about everything.  Actually my first decision would be the original K&R style since that's how I've written my C code for years now, but the EasyUO parser doesn't like having braces on the same line.  Whenever I do code, I like to have it compact, but clear.  If you indent too much, you get so much whitespace and nothing really to show for it.  Whitespace should be used to make your code easier to read, and not tedious to read.

If you like Whitesmiths style, i.e.
Code: [Select]
while x == y
    {
    gosub something
    gosub somethingelse
    }
 
gosub finalthing

I never liked that one because large code just isn't as clear to me as K&R or Allman .  I may add support for Whitesmiths and GNU style when I finally implement the much needed User Config panel.  There's lots of hidden options that are just being defaulted to right now, but you might want to tweak those.
------------------
Q: Will ScriptUO be a new language entirely?

A: No, it will adhere to the syntax of EasyUO as a subset.  I don't want to completely alienate all those script authors and scripts out there so I wanted to maintain a specific compatibility.  However, I'm already adding additional functionality to SUO and will probably add more commands/functions as it draws closer to Beta.
« Last Edit: November 08, 2009, 12:17:12 AM by TrailMyx »
Please read the ScriptUO site RULES
Come play RIFT with me!

Tags: