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

Passing variables with semi-colons

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



Joined: 10 Oct 2005
Posts: 11

PostPosted: Mon Apr 24, 2006 9:09 pm    Post subject: Passing variables with semi-colons Reply with quote

I've hit this problem before and found workarounds, but was wondering if there was a better way of doing this.. I'm trying to pass variables that contain semi-colons, but haven't had any luck. For example, I've got an alias that sets a variable so that it survives the current session and is carried over to the next.
Code:
#alias {SetVar} {
     #variable %1 %2;
     #gts #variable %1 %2
}

Now when I try to use it for something like walking around..
Code:
SetVar {gotostore}{d2w4ne}
$gotostore

That works. When the path gets trickier..
Code:
SetVar {gotostore}{d;open door;w4ne}
$gotostore

Things go bad.. gotostore stores 'd', and the client attempts to execute 'open door' and 'w4ne'.

I've tried tricks like {w\;open door\;d}, or even using \x3B in the variable. So far no luck.

Any tips on how to pass along variables with semi-colons?

Steve
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3281

PostPosted: Tue Apr 25, 2006 8:41 am    Post subject: Reply with quote

You'd want to use:

Code:

#alias {SetVar}
{
     #variable {%1} {%2};
     #gts #variable {%1} {%2}
}


This will still not work very well, though using \n instead of ; would get the job done.

SetVar {gotostore}{d\nopen door\nw4ne}

I'm not entirely sure why you don't use an alias though.
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