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
Seb
Wizard


Joined: 14 Aug 2004
Posts: 1269

PostPosted: Sat Oct 13, 2007 6:22 pm   

[2.06] No way to select script language for #VARFUNCs
 
I know #VARFUNCs are deprecated, but this may be a compatibility issue for some people (not me). Variables in 2.06 have no way to select the script language like they did in zMUD.
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Sat Oct 13, 2007 6:33 pm   
 
...that's because the concept doesn't make sense. There's no script to associate with varfuncs - they're not actual functions, they're not compiled or anything. It's just a string that's evaluated at runtime rather than compile time. You can already put, say, a lua script in a CMUD variable, and then get the string using the Lua variable syntax (which I've temporarily forgotten) and use assert(loadstring(...))() to run the string. How you'd do that with other languages depends on whether they support running dynamic strings as scripts. If you wanted to go the other way and run dynamic Lua code from zScript, that's what the #lua command's for.

But yeah, in short - there's no script language option for varfuncs because there's no script language for varfuncs. It depends how you use them.
_________________
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: Sat Oct 13, 2007 6:35 pm   
 
Fang is correct. There is no script language for VARFUNCs. They can only use zScript functions, sorry. With normal #FUNCTIONs, you shouldn't need to use #VARFUNCs anyway. I know it's a bit of a compatibility issue, but it doesn't effect a lot of people and it's pretty trivial to convert your existing VARFUNCs into FUNCTIONs.
Reply with quote
Seb
Wizard


Joined: 14 Aug 2004
Posts: 1269

PostPosted: Sat Oct 13, 2007 9:38 pm   
 
Fang Xianfu wrote:
But yeah, in short - there's no script language option for varfuncs because there's no script language for varfuncs. It depends how you use them.

Well there was in zMUD. And I have never used any script language other than zScript in zMUD or CMUD to date so it doesn't affect me. I point it out because it looks like it will force users to make changes to their scripts. Even if those changes are elementary. Maybe there shouldn't have been an option in zMUD for script language on variables then?
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