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

few question

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> General Discussion
View previous topic :: View next topic  
Author Message
dalton



Joined: 26 Jan 2012
Posts: 30

PostPosted: Sat Feb 25, 2012 8:03 am    Post subject: few question Reply with quote

1. I want set a var value by alias,and use it in a action,but fail.
#alias bookname {#var bookname %1;}
#ac {blabla} {#var $bookname[$num] $content}

the bookname and content,num have right value ,action works.

2.I learn more from the script http://tintin.sourceforge.net/scripts/itemlist.php,but I dunno why do this first:

#system echo -n "" > items.tin;

the file items.tin begin with "-n",and after I read it sth wrong,the tt cannt work.

#read items.tin
#sh $itemlist
#NO SESSION ACTIVE. USE: -session {name} {host} {port} TO START ONE.

and i found none tt cmd can run,just can do ctrl-d to exit.
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Sat Feb 25, 2012 8:42 pm    Post subject: Reply with quote

That's intended to clear the file. Guess you'll have to find an alternative means.
Back to top
View user's profile Send private message Send e-mail
dalton



Joined: 26 Jan 2012
Posts: 30

PostPosted: Mon Feb 27, 2012 6:33 am    Post subject: Reply with quote

hmm,i see.
but my first question ??
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Mon Feb 27, 2012 6:44 pm    Post subject: Reply with quote

I'm not sure what the question is.
Back to top
View user's profile Send private message Send e-mail
dalton



Joined: 26 Jan 2012
Posts: 30

PostPosted: Tue Feb 28, 2012 5:56 am    Post subject: Reply with quote

haha,sorry ,my poor english.

there are 4 books , and i want to write a script to record the book name,book index,and book content(every page),and store in 4 var .

example,book 1 ,named zhuangzi ,then i use a alias set the var "bookname" to zhuangzi first.

#alias bookname {#var bookname %1};
bookname zhuangzi

and write a action recored every page ,store name ,index,contents in the var "zhuangzi"

so like this :
#ac {^==%s%*%s==$}
{
#var content %1;
#var pagenum $pagenum +1;
#var $bookname[$pagenum] $content;
}

I want to get a var named zhuangzi and store one page content in "zhuangzi[$pagenum]"
when action triggered,I think it should be : #var zhuangzi[$pagenum] $content, but "#var $bookname[$pagenum] $content;" not work .

what's wrong ?
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Tue Feb 28, 2012 8:06 am    Post subject: Reply with quote

That won't work because tintin will treat $bookname[$pagenum] as one variable.

Try:

Code:

#alias {setbook}
{
  #var %1[%2] %3
}

setbook {$bookname} {$pagenum} {$content}
Back to top
View user's profile Send private message Send e-mail
dalton



Joined: 26 Jan 2012
Posts: 30

PostPosted: Wed Feb 29, 2012 6:11 am    Post subject: Reply with quote

ok,i know,this better.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> General Discussion 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