Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ SMAUG ➜ SMAUG coding ➜ *prepares for screams* Windows.. Copyover..

*prepares for screams* Windows.. Copyover..

It is now over 60 days since the last post. This thread is closed.     Refresh page


Pages: 1 2  

Posted by Marowi   (65 posts)  Bio
Date Tue 22 Jun 2004 12:39 PM (UTC)
Message
I'm ready for you all this time.

Yes, I want to copyover on Windows. No, I'm not joking.
Yes, I think copyover is worth it. No, I'm really not joking.

The biggest problem I have at the moment is that I cannot find a snippet that work with the codebase I'm on. I picked it up ages ago, not even knowing the difference, and started messing around with it. I've made a crud-load of changes, and I'm not -really- wanting to move to a new codebase at this time. (The codebase I'm currently using I found available from: http://www.archsysinc.com/lotj/archive/swr102port.zip)

When I try to install the many different copyover snippets, they all tell me there's multiple definitions of fCopyOver, or that it's not defined, or that it's not being used.

When I get the copyover snippet to compile, I have a few ideas to go from there, but right now I'm stuck at "getting copyover to compile with my damn codebase".

Please don't tell me how ridiculously hard and unworthwhile Windows Copyovers are; to many people they are the only option.

Thanks in advance,
Marowi
Top

Posted by Nick Cash   USA  (626 posts)  Bio
Date Reply #1 on Tue 22 Jun 2004 06:10 PM (UTC)

Amended on Tue 22 Jun 2004 06:11 PM (UTC) by Nick Cash

Message
Well, post the exact errors here. If its not being defined its easy enough, to many definitions is easy as well. We just need the errors you have to be able to fix them.

Also, if your on swr I suggest getting greven's copyover. Its available on the dark warriors web site I believe.

~Nick Cash
http://www.nick-cash.com
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #2 on Tue 22 Jun 2004 09:05 PM (UTC)
Message
Has anybody ever gotten copyover to work on Windows?

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Nick Cash   USA  (626 posts)  Bio
Date Reply #3 on Tue 22 Jun 2004 11:45 PM (UTC)
Message
Good point :P

~Nick Cash
http://www.nick-cash.com
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #4 on Wed 23 Jun 2004 01:40 AM (UTC)
Message
I believe yes, there was one person on here that got it to work, but not very well. If its not on here, it was either on another forums, or I was imagining it. :P

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Marowi   (65 posts)  Bio
Date Reply #5 on Wed 23 Jun 2004 07:54 AM (UTC)

Amended on Wed 23 Jun 2004 08:19 AM (UTC) by Marowi

Message
My reason for wanting copyover isn't for a pseudo-reboot. It's moreso I don't have to copy/rename the file I compile to over to the file that I execute the mud from, because Windows won't let me compile over the top (write errors).

INSTEAD of having a copyover (because this codebase is NOT happy with any snippet i've seen - I tried 4), I've thought of another way around it.

Basically my current processes are these:
- I compile to maketoto.exe.
- The mud startups from toto$num.exe.
- $num starts as 1 the first time the mud is loaded up.
- When I reboot, '@ num++', so $num becomes 2 after one reboot.
- I then copy/rename 'maketoto.exe' to 'toto$num.exe' in the startup file.

Here is the relevant code to what I have done.
set num = 1
while ( 1 )
    set index = 1000
    while ( 1 )
	set logfile = ../log/$index.log
	if ( ! -e $logfile ) break
	@ index++
    end

    date > $logfile
    date > ../area/boot.txt

    cp ../area/maketoto.exe ../area/toto$num.exe

    ../area/toto$num $port >&! $logfile

    if ( -e shutdown.txt ) then
	rm -f shutdown.txt
	exit 0
    endif
    rm ../area/toto$num.exe
    @ num++
    sleep 10

end

This is but a temporary fix, I'm really hoping to have a copyover code working. I'll go grab Greven's snippet and stick it in, then paste the compile errors and relevant sections of code.

(I was fairly mind-wasted last night. Just finished exams and had barely slept - the post made little sense, reading it now)

Thanks for the patience!
Marowi.

[I edited it because when I started the post, I was asking how to do it, and I'd done it before I finished writing the post - had to clean it up]
Top

Posted by Gatewaysysop2   USA  (146 posts)  Bio
Date Reply #6 on Wed 23 Jun 2004 08:52 AM (UTC)
Message
In answer to one question, whether *anyone* ever got copyover to work under Windows, I can take some credit there. I have and continue to use it under Win98 and 98SE without issue. Samson helped me identify a problem a long ways back (security thing), but with that out of the way it seems to work fine.

Here the relevant link from my old post:

http://www.gammon.com.au/forum/bbshowpost.php?token=1925d42e8b6160a8b4a5b8889536ee5e&bbsubject_id=3415

Check it out, hope it helps!

"The world of men is dreaming, it has gone mad in its sleep, and a snake is strangling it, but it can't wake up." -D.H. Lawrence
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #7 on Wed 23 Jun 2004 05:09 PM (UTC)
Message
You guys are cheating - you're using Cygwin, which changes the rules of the game. :) As far as I know, nobody has gotten it to work under native Windows.

Marowi, I admit to not spending a lot of time perusing that code, but what is the problem and what is not working?

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Gatewaysysop2   USA  (146 posts)  Bio
Date Reply #8 on Wed 23 Jun 2004 09:58 PM (UTC)
Message
Well not technically running Cygwin, but just using it to compile and then firing up SMAUG with the cygwin.dll file in the directory (areas) that it's being executed from. I do NOT run from within Cygwin's shell, if that's what you're thinking.

I don't know, maybe you can call that half way cheating since I'm using but not technically running Cygwin to run SMAUG? Anyway, just trying to point that out. I use it to compile, but I don't run SMAUG under Cygwin as I assume most might think.

Hope that helps or at least reduces the confusion.

"The world of men is dreaming, it has gone mad in its sleep, and a snake is strangling it, but it can't wake up." -D.H. Lawrence
Top

Posted by Marowi   (65 posts)  Bio
Date Reply #9 on Sat 26 Jun 2004 01:08 AM (UTC)
Message
I seriously don't care about 'cheating' at this time. I just want it to work, regardless of how many traditions (or whatever) I have to break.

I haven't found a copyover snippet to successfully install. If anyone could direct me towards one they'd suggest implementing, i'll stick it in and list off the errors/relevant code/stuff.

Hasty post, going to an 18th.

Thanks,
Marowi.
Top

Posted by Greven   Canada  (835 posts)  Bio
Date Reply #10 on Sat 26 Jun 2004 04:43 AM (UTC)
Message
Try this is you happen to be running SWR:

http://www.darkwarriors.net/downloads/snippets.html

or here is your using SMAUG:

http://www.afkmud.com/scripts/download.php?file=hotboot.zip


That might work, you may need to go in manually through www.afkmud.com into the "SMAUG code and Snippets" section.


This is a easier version of Samsons, but in my opinion inferior:

http://www.andreasen.org/ftp/copyover-7.tar.gz

Can try here as well:

http://www.mudmagic.com/cgi-bin/codes/jump.cgi?ID=1424

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
Top

Posted by Marowi   (65 posts)  Bio
Date Reply #11 on Sun 04 Jul 2004 10:46 AM (UTC)

Amended on Sun 04 Jul 2004 12:21 PM (UTC) by Marowi

Message
Righto, I've been busy but I've finally got it done.

I installed the SWR copyover from darkwarriors, as suggested, and the following errors come up.

In function 'do_hotboot':

error: 'timer' undeclared (first use in this function)
error: 'timer_next' undeclared (first use in this function)
for ( timer = och->first_timer; timer; timer = timer_next )

warning: format argument is not a pointer (arg 8)
warning: too many arguments for format
fprintf( fp, "%d %d %d %d %d %s %s\n",
d->descriptor,
#ifdef MCCP
d->can_compress,
#else
0,
#endif

#ifdef GAVMXP
(int) d->mxp_detected,
#else
0,
#endif
och->in_room->vnum, d->port, d->idle, och->name, d->host );

In function 'hotboot_recover':

warning: char format, different type arg (arg 8)
warning: too many arguments for format
fscanf( fp, "%d %d %d %d %d %s %s\n", &desc, &dcompress, &room, &mxp, &dport, &idle, name, host );


The warnings just need another '%d' but I posted every problem with the compile. (surprisingly less than all the other times I've tried, but I've never used this snippet - nor has it had seperate files for hotboot.c and hotboot.h before)

Marowi

{edit}
Something I noticed. It fprints in the order of "desc, dcompress, mxp, room, dport, idle, name, host" but fscanfs in the order of "desc, dcompress, room, mxp, dport, idle, name, host" (mxp and room are switched around). I've fixed this in my copy.
Top

Posted by Greven   Canada  (835 posts)  Bio
Date Reply #12 on Sun 04 Jul 2004 03:14 PM (UTC)
Message
Thanks for pointing out these errors. I've had a couple people install this without telling me about these. I have corrected them in the snippet on the site. Thanks.

Yeah, add another %d. You can either remove the section on timers, or declare the timer at the top, your choice, dunno how that got removed.

I also put mxp and room in the proper order.

Hope that helps, thanks for the input on this, its pretty new snippet.

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
Top

Posted by Marowi   (65 posts)  Bio
Date Reply #13 on Mon 05 Jul 2004 01:42 AM (UTC)

Amended on Mon 05 Jul 2004 02:02 AM (UTC) by Marowi

Message
Perhaps I'm paranoid, or maybe I'm lazy...

If you could tell me -exactly- where to add what, I'd much rather that than me add something incorrectly and be bugging you indefinately.

Marowi
Top

Posted by Greven   Canada  (835 posts)  Bio
Date Reply #14 on Mon 05 Jul 2004 01:50 AM (UTC)

Amended on Mon 05 Jul 2004 02:00 AM (UTC) by Greven

Message
heh, k, here is what it should look like:
            fprintf( fp, "%d %d %d %d %d %d %s %s\n",                     d->descriptor,
#ifdef MCCP
                     d->can_compress,
#else
                     0,
#endif

#ifdef GAVMXP
					(int) d->mxp_detected,
#else
					0,
#endif
                     och->in_room->vnum, d->port, d->idle, och->name, d->host );
And in hotboot_recover:
        fscanf( fp, "%d %d %d %d %d %d %s %s\n", &desc, &dcompress, &mxp, &room, &dport, &idle, name, host );


And remove this:
			for ( timer = och->first_timer; timer; timer = timer_next )
			{
		    	timer_next = timer->next;
				if ( timer->type == TIMER_DO_FUN )
				{
				    int tempsub;
				    tempsub = ch->substate;
				    och->substate = timer->value;
				    (timer->do_fun)( och, "" );
				    if ( char_died(och) )
						break;
			    	och->substate = tempsub;
				}
				extract_timer( och, timer );
	    	}


If there are other problems, lemme know

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


62,811 views.

This is page 1, subject is 2 pages long: 1 2  [Next page]

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.