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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
hav
Wanderer


Joined: 05 Oct 2004
Posts: 61
Location: Riga, Latvia

PostPosted: Fri Jan 20, 2006 5:16 am   

#SS question
 
I am trying to use insert javascript with #SS into zscript, I am trying to build true case statement with javascript without abusing #abort hack found on these forums. How do you properly encapsulate it so it doesnt take third line?
Code:
#ECHO moo
#SS "JScript" {for (var x = 1; x <= 3; x++) {sess.ProcessCommand("#ECHO "+sess.ExpandStr("%1")+x)}}
#ECHO moo

it always takes third line into #SS, "" or {} or '' or nothing
zmud 7.21
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Tue Jan 31, 2006 2:43 pm   
 
I'm not sure. Perhaps you can glean something from:
http://forums.zuggsoft.com/phpbb/viewtopic.php?t=7520&highlight=%23ss+jscript
Reply with quote
hav
Wanderer


Joined: 05 Oct 2004
Posts: 61
Location: Riga, Latvia

PostPosted: Tue Jan 31, 2006 5:23 pm   
 
interesting. said post uses no encapsulation, ;; to terminate first line, ; to terminate second line. If #SS has only have one line, it even sort of works.. halfway anyway. javascript gets executed, then the rest of zscript gets dropped and ignored. two lines of javascript flat out refuse to coexist with zscript, no matter how I tried to terminate or encapsulate them (including copy/pasting two-line example from that post).
My apologies, I didnt mean it as a trick question. I thought adding a couple lines of javascript to zscript would be trivial. It isnt that important or urgent, I can wait a few months for cmud with (hopefully) proper scripting support of a real language like perl.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion 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