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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
albo
Apprentice


Joined: 27 Mar 2008
Posts: 106

PostPosted: Sun Apr 05, 2020 6:41 am   

Having trouble with sending the value of a variable to the MUD.
 
Hi There!

I'm trying to store a command that changes based on some things, and I've been trying to use the #send command to send that to the MUD. I keep receiving the following error: ERROR: Trigger "insert specific wording to my trigger and MUD" fired but did not compile

I've got a variable, lets call it:
sendContents

The variable contains:
MUD command

What my trigger contains, but doesn't work:
#send sendContents

I've also tried:
#send "@sendContents"

And:
#send @sendContents

Works without using a trigger:
alias = toSendContents
alias contains = #send @sendContents

So I put the alias in the trigger, but that didn't work. So then I tired:
#send %expand(sendContents)

In short, I've tired a lot but I just can't seem to understand why the alias is making it work but the trigger wouldn't. Any thoughts?
Reply with quote
albo
Apprentice


Joined: 27 Mar 2008
Posts: 106

PostPosted: Mon Apr 06, 2020 4:13 am   
 
I got this working. I used #execute {@sendContents}.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4549
Location: Pensacola, FL, USA

PostPosted: Mon Apr 06, 2020 11:33 am   
 
I have had similar issues from trying to call an alias from evaluating a variable.
The results are treated as a literal string unless you #EXEC them first.

I am uncertain of why this would have been the case for a game side command though, those don't require client-side parsing.
_________________
Discord: Shalimar#3679
Reply with quote
albo
Apprentice


Joined: 27 Mar 2008
Posts: 106

PostPosted: Mon Apr 06, 2020 6:48 pm   
 
Oddly enough, now #send @sendContents is working.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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