TinTin++ Mud Client The TinTin++ message board

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
TinTin++ Mud Client

"Eval" Statement in TinTin

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Script Help
View previous topic :: View next topic  
Author Message
atraeyu



Joined: 12 Dec 2007
Posts: 165

PostPosted: Sun Feb 23, 2014 4:47 pm    Post subject: "Eval" Statement in TinTin Reply with quote

I'm trying to do the equivalent of an "eval" command - I want to pass a command into an alias as an argument and have the alias execute the string as a command.

Any ideas how I might accomplish this?

This is what I was trying, however it's not working:

Code:
#nop +-----------------------------------------------------------------------+;
#nop | STDLIB : DEBUG : Execute Command if Debug Flag is Enabled             |;
#nop +-----------------------------------------------------------------------+;

#alias {_stdlib_debugCommand}
{
    #if { ${_stdlib.debug.enabled} == true }
    {
        #if {"%1" == ""}
        {

            _stdlib_debugMessage {_stdlib.debug} {ERROR} {Usage: _stdlib_debugCommand {COMMAND}};
        };
        #else
        {
            #script {_stdlib.debugCommand.return}
            {
                echo "%1"
            };
        };
    };
};

#nop +-----------------------------------------------------------------------+;
#nop | STDLIB : DEBUG : Testing Library                                      |;
#nop +-----------------------------------------------------------------------+;

_stdlib_debugEnable;

#nop Testing the debug message output.;
_stdlib_debugMessage {_stdlib.debug} {DEBUG};
_stdlib_debugMessage {_stdlib.debug} {DEBUG} {Testing DEBUG message in _stdlib.debug.};

#nop Testing debugCommand;
#alias {test_command}
{
    #showme {Hello from test_command.};
    #var {test_var} {test_value};
};

_stdlib_debugCommand {test_command;};

_stdlib_debugDisable;
Back to top
View user's profile Send private message AIM Address
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Mon Feb 24, 2014 10:08 pm    Post subject: Reply with quote

Can try using '#debug all on' to see what's happening.

Looks like it ought to work.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Script Help All times are GMT - 5 Hours
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
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
TinTin++ Homepage

Powered by phpBB © 2001, 2002 phpBB Group