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 ➜ addon to the compiling and such

addon to the compiling and such

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


Pages: 1  2 3  

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #15 on Sun 31 Aug 2003 01:55 PM (UTC)

Amended on Sun 31 Aug 2003 01:57 PM (UTC) by David Haley

Message
The problem, Walker, is that guides, while meant to be helpful, are not meant to solve all your problems. You have to know the basics yourself, such as how to navigate in the shell (Cygwin in your case), the very basics of what compiling even means, etc.

Of course you are new, so people understand that you need to be told everything. However, your side of the deal is to accept that you need to be told everything, so if Nick asks you "what do you think that means?" he isn't being sarcastic, he's trying to guide you through the process. If you were to be a mindless robot you would get nowhere. So, if you want to be treated like a newbie, accept that you are a newbie and consequently if someone asks you a question, answer it, and if someone tells you something, don't give them bucketloads of excrement for saying it.


The reason that your tar is not working is obviously because the tar is not there. Go to your directory and type 'ls -l' (those are Ls, not ones) and paste exactly what you see. You don't need to paste everything you've pasted before, we've seen it already, you can just refer to it and we can go and look. It just makes your posts very hard to read, especially since you don't use the forum codes to separate your text and what you're pasting.

Oh, and after make clean, you might have to type make again. Some makefiles don't have the re-make as part of the clean, at least my older SMAUG makefile doesn't... maybe the new ones have changed.

As an editor, there are many... you could install vi in Cygwin but that would more likely confuse you more than anything else. Do a google search for the "Programmer's File Editor", that is a fairly good editor that knows about file formats. You can also get "Crimson Editor" which is a syntax-aware editor, which is quite nice.

Also, don't forget that we only know what's wrong based on what you say. And if what you say is riddled with imprecise statements, even if you paste things that may look technical, we don't know what's wrong. So if people ask you seemingly easy and stupid questions, give them the seemingly stupid and dumb answers, exactly. You can't just ask: "It's broken, how do I fix it?" because in this kind of job there are soooooo many things that can go wrong that you have to say *exactly* what is broken. As Boborak said it might be something as stupid as you're not using proper capitalization somewhere.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

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

Posted by Walker2   (19 posts)  Bio
Date Reply #16 on Sun 31 Aug 2003 01:55 PM (UTC)
Message
As for what happens when i type make in the /smaug/dist/src directory it was explained in the guide as this:

If you get an error message along the lines of:


/usr/lib/gcc-lib/i686-pc-cygwin/3.2/../../../../i686-pc-cygwin/bin/ld: cannot find -lregex
collect2: ld returned 1 exit status
make[1]: *** [smaug] Error 1
make[1]: Leaving directory `/home/nick/smaug/dist/src'
make: *** [all] Error 2

... you may need to edit the file "Makefile" and comment-out the line regarding regexp, like this:


#Uncomment the line below if you are getting undefined re_exec errors
#NEED_REG = -lregex

I guess thats where the editor will come in handy. Also the make clean thing what does that do exactly?
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #17 on Sun 31 Aug 2003 01:59 PM (UTC)
Message
Quote:

As for what happens when i type make in the /smaug/dist/src directory it was explained in the guide as this:

If you get an error message along the lines of:


/usr/lib/gcc-lib/i686-pc-cygwin/3.2/../../../../i686-pc-cygwin/bin/ld: cannot find -lregex
collect2: ld returned 1 exit status
make[1]: *** [smaug] Error 1
make[1]: Leaving directory `/home/nick/smaug/dist/src'
make: *** [all] Error 2

... you may need to edit the file "Makefile" and comment-out the line regarding regexp, like this:


#Uncomment the line below if you are getting undefined re_exec errors
#NEED_REG = -lregex

You've posted that same thing many times. Did you actually DO what it said to do? i.e. comment the line about regex.


Quote:

Also the make clean thing what does that do exactly?

make clean will delete all temporary files so that you start your build over again... "clean". It's useful to make sure that you're starting from scratch.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

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

Posted by Walker2   (19 posts)  Bio
Date Reply #18 on Sun 31 Aug 2003 02:01 PM (UTC)
Message
What i did is remove the smaug directory totally and started from scratch again. Same thing happened of course with the makefiles as i listed above. I did the make, then make clean, then did another make. Same error came up for it. The fix is shown in the guide, so this Crimson Editor will edit the unix file i need to edit to fix this problem in the makefile?
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #19 on Sun 31 Aug 2003 02:07 PM (UTC)
Message
Crimson Editor is a program that knows how to properly display newlines in Windows and Unix programs.

If you open the makefile in notepad you may see it all in one line, with funny square characters... those indicate newline on Unix, and notepad doesn't understand them.

And potentially worse yet, if you edit in notepad, you will save it in Windows format, which may then cause other problems for Unix... even if, most of the time, it works.

So, yes, Crimson Editor will allow you to comment out the line and not have to worry about file formats.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

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

Posted by Walker2   (19 posts)  Bio
Date Reply #20 on Sun 31 Aug 2003 02:32 PM (UTC)
Message
Good news is that it all worked out with the editor and fixing the makefile. Now i seem to be stuck on this part of the guide:
Let's change the word "Thoric" to "Gandalf" to show the general idea.
We need to find which files have Thoric quoted, as described earlier:

$ grep '"Thoric' *.c -n
act_obj.c:2230: strcpy( name, "Thoric" );
fight.c:265: do_shout( ch, "Thoric says, 'Prepare for the worst!'" );
magic.c:2580: act( AT_MAGIC, "Thoric protects $N.", ch, NULL, victim, TO_ROOM);
update.c:661: do_shout( ch, "Thoric says, 'Prepare for the worst!'" );

You can use your favourite editor here to change the files, but let's assume you are going to use "vi" which comes with Cygwin (and Unix). Here is what you would type for the first file:

vi act_obj.c <-- Edit the file
2230G <-- Go to line 2230
:s/Thoric/Gandalf/ <-- Change Thoric to Gandalf
ZZ <-- Save the changes to disk

I can do the grep part and locate (even though it says unable to locate -n).
When i type in the last part that actually edits the act_obj.c file do i type all that at once? Meaning vi act_obj.c 2230G :s/Thoric/Gandalf/ ZZ? What do i do at this point?
Top

Posted by Boborak   USA  (228 posts)  Bio
Date Reply #21 on Sun 31 Aug 2003 02:53 PM (UTC)
Message
Thispart of the guide is showing you a tutorial on using a popular unix editor (my personal favorite) called 'vi'. It's not really necessary if you are comfortable with another unix compatible editor but is a handy tutorial none the less.

vi act_obj.c <-- Edit the file
2230G <-- Go to line 2230
:s/Thoric/Gandalf/ <-- Change Thoric to Gandalf
ZZ <-- Save the changes to disk

Each one of those lines is a command.

At the command line, type 'vi act_obj.c' (sans quotes) and hit enter.

Then type '2230G' (you won't need to hit enter)

Next type ':s/Thoric/Gandalf/' and hit enter

Finally type 'ZZ' you will be returned to the prompt.

A good website to look at involving the 'vi' editor (and it's bigger brother 'vim') is www.vim.org
Top

Posted by Walker2   (19 posts)  Bio
Date Reply #22 on Sun 31 Aug 2003 03:02 PM (UTC)
Message
What if the cygwin isnt showing the line numbers of the locations of where they need to be edited? When i used the -n at the end of grep '"Thoric' *.c -n it will come out throwing the files it finds thoric in, and then it will spit out :
grep: -n: No such file or directory.

What did i do wrong or not do?
Top

Posted by Boborak   USA  (228 posts)  Bio
Date Reply #23 on Sun 31 Aug 2003 03:04 PM (UTC)
Message
Try this:

grep -n "Thoric" *
Top

Posted by Walker2   (19 posts)  Bio
Date Reply #24 on Sun 31 Aug 2003 03:09 PM (UTC)
Message
Cool, i gathered what you said and mixed it to come up with grep -n '"Thoric' *.c and it found exactly the files i needed to edit thanks.
Top

Posted by Walker2   (19 posts)  Bio
Date Reply #25 on Sun 31 Aug 2003 03:24 PM (UTC)
Message
Seems ran into another bug in whatever i did. I am basically at finishting the guide and ready to put in the command $ tcsh startup &

But it comes out saying this (I tried this 2 times).

(Myname)@(Myname) ~/smaug/dist/src
$tcsh startup &
[1] 3656
(Myname)@(Myname) ~/smaug/dist/src
$ limit: Command not found.
(Myname)@(Myname) ~/smaug/dist/src
$tcsh startup &
[2] 3724
(Myname)@(Myname) ~/smaug/dist/src
$limit: Command not found.
Top

Posted by Nick Gammon   Australia  (23,140 posts)  Bio   Forum Administrator
Date Reply #26 on Sun 31 Aug 2003 04:05 PM (UTC)
Message
Quote:

Dude, if i freaking knew how to answer the question i wouldnt be asking here.


When people start f---ing me on this forum they can expect to be banned. My replies were patient and if you start being rude you can expect a lot less co-operation.

Support for SMAUG here is provided free of charge for a program that we do not receive any money for supplying. The least you can do is stay calm and treat the people here with respect.

Quote:

grep: -n: No such file or directory.
What did i do wrong or not do?


Sorry this didn't work. It is an occupational hazard when doing guides like this that commands that work on one version of Unix may not work exactly on another. As someone else replied, the -n needs to go before the file names with some versions of grep.

Quote:

$limit: Command not found.


Again, some versions of Unix have limit and others don't, or maybe you just didn't install that when you downloaded Cygwin (and didn't know to, no doubt). Again, you could try to find the limit command on the Cygwin site, or simply start SMAUG a different way. In many places on this forum we suggest you can start SMAUG by simply doing this after a successful make:

cd ../area
../src/smaug

Quote:

I guess thats where the editor will come in handy.


As is mentioned earlier in the guide you can use "your favourite editor" to edit files. I hope it is not stating the obvious but when I suggest editing a file, I am referring to any text editor that can open a text file and make changes. Unlike Windows, the Unix environment is basically a text one, where most files can be edited with any editor. For instance, Notepad will do it on Windows. I mention elsewhere that I use UltraEdit. However if you search for a text editor on a popular downloading site I guess you will find hundreds.

Quote:

However, your side of the deal is to accept that you need to be told everything, so if Nick asks you "what do you think that means?" he isn't being sarcastic, he's trying to guide you through the process.


Thank you to everyone who has tried to help and calm this thread down a bit. I don't really have time to guide you (Walker) through the absolute basics of what to do when it says "file not found". You need to take a bit of responsibility for working it out. If the file is not found then clearly it is not in the exact directory where you thought you put it. Try working it out for yourself. Next time you will understand the process. If I just say "type X then Y then Z" you will not understand how to fix the next problem.



- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Walker2   (19 posts)  Bio
Date Reply #27 on Sun 31 Aug 2003 04:18 PM (UTC)
Message
Well i followed your installing of cygwin to the dot. the only prob i find now is typing in tcsh startup &.
Top

Posted by Nick Gammon   Australia  (23,140 posts)  Bio   Forum Administrator
Date Reply #28 on Sun 31 Aug 2003 04:22 PM (UTC)
Message
First, try editing the startup file and removing the limit line, it doesn't look all that important ...


# Set limits.
nohup
nice
limit stack 1024k
if ( -e shutdown.txt ) rm -f shutdown.txt


Put a # at the start of it to comment it out.

If that doesn't work just do what I said earlier:


cd ../area
../src/smaug

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Walker2   (19 posts)  Bio
Date Reply #29 on Sun 31 Aug 2003 04:41 PM (UTC)
Message
Okay that worked good enough thanks.

But when i go to test the mud out i get this upon entering lordrom as name:
Password:
<!ELEMENT Ex '<send>' FLAG=RoomExit><!ELEMENT rdesc '<p>' FLAG=RoomDesc><!ELEMENT Get "<send href='get &#39;&name;&#39;|examine &#39;&name;&#39;|drink &#39;&name;&#39;' hint='RH mouse click to use this object|Get &desc;|Examine &desc;|Drink from &desc;'>" ATT='name desc'><!ELEMENT Drop "<send href='drop &#39;&name;&#39;|examine &#39;&name;&#39;|look in &#39;&name;&#39;|wear &#39;&name;&#39;|eat &#39;&name;&#39;|drink &#39;&name;&#39;' hint='RH mouse click to use this object|Drop &desc;|Examine &desc;|Look inside &desc;|Wear &desc;|Eat &desc;|Drink &desc;'>" ATT='name desc'><!ELEMENT Bid "<send href='bid &#39;&name;&#39;' hint='Bid for &desc;'>" ATT='name desc'><!ELEMENT List "<send href='buy &#39;&name;&#39;' hint='Buy &desc;'>" ATT='name desc'><!ELEMENT Player "<send href='tell &#39;&name;&#39; ' hint='Send a message to &name;' prompt>" ATT='name'>

Then in game when i type look i get things like <rdesc> and </rdesc> and in exit line i see <Ex> </Ex> will gods only be able to see that or will everyon?
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.


88,599 views.

This is page 2, subject is 3 pages long:  [Previous page]  1  2 3  [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.