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

wintin++ transfer to tintin++

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



Joined: 14 Feb 2015
Posts: 66

PostPosted: Sat Mar 14, 2015 5:45 am    Post subject: wintin++ transfer to tintin++ Reply with quote

Due to win7 system, I have to use tintin++ under Cygwin.

I was using wintin++ in winxp. When it starts, it will read main.tin automatically. I have installed Cygwin and tintin++ and all the .tin files have been copied to tt/src. How can I start to run my main.tin in Cygwin. All seems correct when I run tt++ in Cygwin.

Sorry about this silly question, I am completely new to linux
Back to top
View user's profile Send private message
PowerGod



Joined: 04 Aug 2014
Posts: 339

PostPosted: Sat Mar 14, 2015 4:31 pm    Post subject: Reply with quote

Maybe this can be useful ?

http://tintin.sourceforge.net/starting.php
Back to top
View user's profile Send private message
dawang10



Joined: 14 Feb 2015
Posts: 66

PostPosted: Sat Mar 14, 2015 5:19 pm    Post subject: Reply with quote

I tried. But I didn't figure it out.

Create and edit the file 'run' with your favorite text editor and add the following line:
./tt++ run.tin

which fold should I put the file 'run' in. and is the file 'run' run.txt?

it always says when I enter chmod 700 run

No such file or directory
Back to top
View user's profile Send private message
PowerGod



Joined: 04 Aug 2014
Posts: 339

PostPosted: Sat Mar 14, 2015 6:14 pm    Post subject: Reply with quote

You can create the "run" file (the name can be changed) directly in your home folder, because it's the starting directory of cygwin.

Supposing that your "tt/src" is in your home directory (/home/username/ or ~/), to create the "run" file you can do this:

Code:

echo -e "cd tt/src \n./tt++ run.tin" > run

chmod 700 run


now, when you start cygwin terminal, you just type "./run"

by the way, in Linux and similar systems the file extensions are not so important as in Windows, in this case the "run" file it's somehow the same as a batch file (.bat) on Windows, but the extension is not required because the chmod command flagged it as executable.
Back to top
View user's profile Send private message
dawang10



Joined: 14 Feb 2015
Posts: 66

PostPosted: Sun Mar 15, 2015 6:49 am    Post subject: Reply with quote

Thanks, I changed run.tin to main.tin

so I can connect to the mud.

here is a problem again,

it shows,

DEBUG_STACK[000] = poll_sessions(void)
DEBUG_STACK[001] = readmud(0x200ab058)
DEBUG_STACK[002] = process_mud_output(0x200ab058,0x21caa8,0)

DEBUG_STACK[004] = script_driver(0x200ab058,0,0x1fca0c)
DEBUG_STACK[005] = do_variable(0x200ab058,0x200f0530)
DEBUG_STACK[006] = substitute(0x200ab058,0x200f0938,0x200cea68,6)
DEBUG_STACK[007] = script_driver(0x200ab058,7,0x1dc8b0)
DEBUG_STACK[008] = do_variable(0x200ab058,0x200e03d0)
DEBUG_STACK[009] = substitute(0x200ab058,0x201163e8,0x2010e3d8,6)
DEBUG_STACK[010] = substitute(0x200ab058,0x1bc750,0x1b4750,6)
DEBUG_STACK[011] = substitute(0x200ab058,0x1a46e0,0x19c6e0,6)
DEBUG_STACK[012] = substitute(0x200ab058,0x18c670,0x184670,6)
DEBUG_STACK[013] = substitute(0x200ab058,0x174600,0x16c600,6)
DEBUG_STACK[014] = substitute(0x200ab058,0x15c590,0x154590,6)
DEBUG_STACK[015] = substitute(0x200ab058,0x144520,0x13c520,6)
DEBUG_STACK[016] = substitute(0x200ab058,0x12c4b0,0x1244b0,6)
DEBUG_STACK[017] = substitute(0x200ab058,0x114440,0x10c440,6)
DEBUG_STACK[018] = substitute(0x200ab058,0xfc3d0,0xf43d0,6)
DEBUG_STACK[019] = substitute(0x200ab058,0xe4360,0xdc360,6)
DEBUG_STACK[020] = substitute(0x200ab058,0xcc2f0,0xc42f0,6)
DEBUG_STACK[021] = substitute(0x200ab058,0xb4280,0xac280,6)
DEBUG_STACK[022] = substitute(0x200ab058,0x9c210,0x94210,6)
DEBUG_STACK[023] = substitute(0x200ab058,0x841a0,0x7c1a0,6)
DEBUG_STACK[024] = script_driver(0x200ab058,7,0x64130)
DEBUG_STACK[025] = do_replace(0x200ab058,0x200d9e38)

then quit TT++ go back to command shell automatically.

is there any grammar of script in tintin++ different from wintin++ ?
Back to top
View user's profile Send private message
PowerGod



Joined: 04 Aug 2014
Posts: 339

PostPosted: Sun Mar 15, 2015 12:49 pm    Post subject: Reply with quote

I can't help here because I never used Wintin...

You should try to disable everything loaded by the main.tin, and then enable them one at a time to catch what trigger the issue

Anyway Tintin++ on cygwin is more powerful than Wintin++, you can also use all the awesomeness of the GNU and shells utilities.
Back to top
View user's profile Send private message
PowerGod



Joined: 04 Aug 2014
Posts: 339

PostPosted: Sun Mar 15, 2015 12:57 pm    Post subject: Reply with quote

oh, now that I think of it, are there in your script some Windows-like paths ?

"C:\directory\file.ext"

them must be substituted for the cygwin filesystem:

"/cygdrive/c/directory/file.ext"

also, cygwin is CASE SENSITIVE, so "file.ext" is different from "File.ext"
Back to top
View user's profile Send private message
dawang10



Joined: 14 Feb 2015
Posts: 66

PostPosted: Sun Mar 15, 2015 1:18 pm    Post subject: Reply with quote

Thank you. you help me a lot.


I will try to learn cygwin
Back to top
View user's profile Send private message
dawang10



Joined: 14 Feb 2015
Posts: 66

PostPosted: Sun Mar 15, 2015 1:52 pm    Post subject: Reply with quote

Is it possible that because I didn't install the right packages? I am not sure of this. Lots of packages need to install. And the video on youtube shows a slight difference compared with the one of website.

I checked again. it doesn't seem due to main.tin. It looked working well when I connected with the main.tin loaded. The crash happened once I login my char.
Back to top
View user's profile Send private message
dawang10



Joined: 14 Feb 2015
Posts: 66

PostPosted: Sun Mar 15, 2015 2:40 pm    Post subject: Reply with quote

In my main.tin
#read id/rees.tin

all of tin files are under C:\Cygwin\home\Username\tt\src

The id folder is in the tt\src folder.

When logging my char in, it need to read id/rees.tin. is here a problem?
Back to top
View user's profile Send private message
PowerGod



Joined: 04 Aug 2014
Posts: 339

PostPosted: Mon Mar 16, 2015 7:33 am    Post subject: Reply with quote

the call seems legit, it must be something inside rees.tin...

do the same as above, disable everything from rees.tin and launch the instructions one by one until you get the issue
Back to top
View user's profile Send private message
dawang10



Joined: 14 Feb 2015
Posts: 66

PostPosted: Tue Mar 17, 2015 6:29 pm    Post subject: Reply with quote

Thanks,

I think I've figured out where the problem is.

It's one of my functions in which I used a lot of nested #replace

trying to rewrite the functions.
Back to top
View user's profile Send private message
dawang10



Joined: 14 Feb 2015
Posts: 66

PostPosted: Tue Mar 17, 2015 6:34 pm    Post subject: Reply with quote

Code:

#function {replace} {#var result %1;#replace result {%2} {%3}};
#function {transformnum} {#math result {@replace{@replace{{0+@replace{@replace{@replace{@replace{@replace{@replace{@replace{@replace{@replace{@replace{@replace{@replace{@replace{@replace{%1;{zero};{*0+}};{ten};{*10+}};{hundred};{*100+}};{thousand};{*1000+}};{tenthousand};{*10000+}};{six};{6}};{one};{1}};{two};{2}};{three};{3}};{four};{4}};{fife};{5}};{seven};{7}};{eight};{8}};{nine};{9}}+0};{++};{+}};{+*};{+}}}};
Back to top
View user's profile Send private message
dawang10



Joined: 14 Feb 2015
Posts: 66

PostPosted: Tue Mar 17, 2015 6:40 pm    Post subject: Reply with quote

it's quite strange, in wintin++, it works.
Back to top
View user's profile Send private message
PowerGod



Joined: 04 Aug 2014
Posts: 339

PostPosted: Wed Mar 18, 2015 6:17 am    Post subject: Reply with quote

That code seems a little too complex for me to understand... may I propose something more readable ?

Code:

#function {transformnum}
{
#var strnum {%1};
#replace strnum {zero} {*0+};
#replace strnum {ten} {*10+};
#replace strnum {hundred} {*100+};
#replace strnum {thousand} {*1000+};
#replace strnum {tenthousand} {*10000+};
#replace strnum {six} {6};
#replace strnum {one} {1};
#replace strnum {two} {2};
#replace strnum {three} {3};
#replace strnum {four} {4};
#replace strnum {five} {5};
#replace strnum {seven} {7};
#replace strnum {eight} {8};
#replace strnum {nine} {9};
#var strnum {0+$strnum+0};
#replace strnum {++} {+};
#replace strnum {+*} {+};
#math result {$strnum};
#return $result;
}


by the way, I supposed that "fife" was a typo
Back to top
View user's profile Send private message
dawang10



Joined: 14 Feb 2015
Posts: 66

PostPosted: Wed Mar 18, 2015 6:43 am    Post subject: Reply with quote

Yeah, yeah
typo indeed.

Thank you so much.
Back to top
View user's profile Send private message
PowerGod



Joined: 04 Aug 2014
Posts: 339

PostPosted: Wed Mar 18, 2015 1:33 pm    Post subject: Reply with quote

No problem Wink

anyway with the phrase "That code seems a little too complex for me to understand" I was meaning instead "to execute", because of so many recursions...

Maybe cygwin manages the memory in a different way than plain windows, or maybe it depends on what values were used to compile tt++...

My code does not use recursions at all, so it should use less resources.

Also, seems like that EVERY antivirus software hates Cygwin programs, in a way or another, even if them are not telling that a virus was found, them can lock used files to scan them, making the actual program behave in a strange way...

Personally I always add a rule in the antivirus to exclude the cygwin folder to be scanned.
Back to top
View user's profile Send private message
dawang10



Joined: 14 Feb 2015
Posts: 66

PostPosted: Wed Mar 18, 2015 3:25 pm    Post subject: Reply with quote

My tintin++ is working now Smile
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