ScriptUO

Scripting Resources & Utilities => ScriptUO Application => General Discussion => Topic started by: Freddy on June 17, 2008, 08:47:18 PM

Title: Syntax Checker & Gosub
Post by: Freddy on June 17, 2008, 08:47:18 PM
Ok, so I have a script that I'm working on that is based off 2 skills. The menu allows a user to choose what skill they'd like to train and sets the #menures to a variable called %skill. The script moves on to the skill table to determine the best way to train for that character. From there, it hits the last gosub before entering a main loop.

To enter the main loop in my script, I use a gosub like this

gosub %skill ;from the menu set var

When I run the syntax checker, it says the sub is unused..which it is until the var is set...but will ScriptUO be able to have a gosub like that and will the syntax checker recognize  that?
Title: Re: Syntax Checker & Gosub
Post by: TrailMyx on June 17, 2008, 09:05:51 PM
Ok, so I have a script that I'm working on that is based off 2 skills. The menu allows a user to choose what skill they'd like to train and sets the #menures to a variable called %skill. The script moves on to the skill table to determine the best way to train for that character. From there, it hits the last gosub before entering a main loop.

To enter the main loop in my script, I use a gosub like this

gosub %skill ;from the menu set var

When I run the syntax checker, it says the sub is unused..which it is until the var is set...but will ScriptUO be able to have a gosub like that and will the syntax checker recognize  that?

Well not really because the syntax checker doesn't really know about runtime stuff which is the variable evaluation as it's determined at runtime.  The syntax checker in the current code is pretty much a pre-parser.

I'll be setting an option where you can ignore non-immediate expressions like "gosub %x".  That'll probably fix what you're thinking.

In the mean time, just consider it a warning since many people might not realize they have potentially improper syntax.  If it's intended, then bully for you!  ;)
Title: Re: Syntax Checker & Gosub
Post by: Freddy on June 17, 2008, 09:10:21 PM
lol

You gotta remember who I am...

I don't follow synatx, syntax follows me :D
Title: Re: Syntax Checker & Gosub
Post by: TrailMyx on June 17, 2008, 09:12:45 PM
lol

You gotta remember who I am...

I don't follow synatx, syntax follows me :D

Lol, well now you have Sister Mary Ethyl, the meter-stick wielding nun who will wrap your knuckles hard when you make a syntax error. 

(yes, a character from my 1st grade life.)
Title: Re: Syntax Checker & Gosub
Post by: Freddy on June 17, 2008, 09:31:10 PM
lmao.

well..hmmm

maybe I better start following proper syntax :P

Nah...i'll risk it :D

by the way.. i really did lmao
Title: Re: Syntax Checker & Gosub
Post by: TrailMyx on June 17, 2008, 09:59:16 PM
lmao.

well..hmmm

maybe I better start following proper syntax :P

Nah...i'll risk it :D

by the way.. i really did lmao

Heh, well she does bring back memories of horror.  I did much better in the non-conformity of public schools.
Title: Re: Syntax Checker & Gosub
Post by: Mystre on September 28, 2008, 06:13:26 PM
FYI : I love the syntax checker :P
Title: Re: Syntax Checker & Gosub
Post by: Xclio on September 28, 2008, 07:54:57 PM
I agree, the syntax checker rocks.  That along with the color coding make it light years beyond EUO!