Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Fri Oct 05, 2007 3:51 am   

[2.04] Specify Function Language at the command line
 
There doesn't seem to be a way to specify the language for function from the command line.

This may be by design, but I just wanted to make sure I wasn't missing something.
_________________
Asati di tempari!
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Fri Oct 05, 2007 4:07 am   
 
Nope, can't be done. The TINTIN-like script syntax doesn't work. You can use Ctrl+' to change the language on the command line, but that's it. Allowing for multiple languages was one of the aims of the new XML format.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Fri Oct 05, 2007 6:01 am   
 
You can also execute a Lua script from within zScript using the #LUA command. But this won't return a value. But Fang is correct...there isn't going to be any way to do this on the command line...too many arguments already. You'll need to use the GUI.
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Fri Oct 05, 2007 2:01 pm   
 
No worries, I was actually just following up on a question that was asked to me. I do most of my coding the package editor.
_________________
Asati di tempari!
Reply with quote
Taz
GURU


Joined: 28 Sep 2000
Posts: 1395
Location: United Kingdom

PostPosted: Fri Oct 05, 2007 6:10 pm   
 
Didn't you just recreate the #FUNCTION command though? I'm assuming the only use for specifying the language would be with the new functions that have the new returns.

Since it's a new command you could change it so that it's first argument is required and equates to a valid scripting language.

Though I can see why there isn't much point as we're trying to encourage sharing of code through the package library and xml.
_________________
Taz :)
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Fri Oct 05, 2007 6:33 pm   
 
No, you can have different scripting languages for any script: Function, Alias, Trigger, Event, etc. So it's not just the #FUNCTION command. I'm not adding any more obscure command line arguments because I'm trying to encourage people to use the GUI.

Also, if you set the Default Language in the Preferences, then any new script will be created in that language. In theory you could use %pref("DefLanguage","Lua") to change the default to Lua within a script, then change it back to zScript.
Reply with quote
Taz
GURU


Joined: 28 Sep 2000
Posts: 1395
Location: United Kingdom

PostPosted: Fri Oct 05, 2007 8:12 pm   
 
Zugg wrote:
No, you can have different scripting languages for any script: Function, Alias, Trigger, Event, etc. So it's not just the #FUNCTION command.

True though I should have made it clear I was comparing #FUNCTION with #VARFUNC where there is no language to be specified.

In any case it was really a throw away comment with my mention of the package library and xml which you further clarified by mentioning the GUI.
_________________
Taz :)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net