21 Jan, 2009, Hades_Kane wrote in the 21st comment:
Votes: 0
Venrexx said:
Lol what was that? a race to see who can define AT_MAGIC? :D lol But seriously though, I think I understand what you mean. Kill playername is designed to do just that and it is also designed somewhere in it to listen to flags, when the safe flag is set and comes out TRUE then instead of kill doing its regular follow through and someones face getting murdered you instead end up with a message and thats all. Right?



This is my train of thought, I don't know if it would be beneficial to your or not. But you've figured out you can grep to find where the message is, right?

That's a good first step. Now that you know -where- in the code that message is being presented, now you just need to take a look at everything else around it. Copy/paste the function in and let's see if we can't help nudge you toward your next step on figuring out how that works.
21 Jan, 2009, Venrexx wrote in the 22nd comment:
Votes: 0
Grep always confused me so I did what I had learned to help me in other parts, I backed up my mud to my computer and used my computers search features. Hasn't failed me yet.
21 Jan, 2009, Hades_Kane wrote in the 23rd comment:
Votes: 0
Venrexx said:
Grep always confused me so I did what I had learned to help me in other parts, I backed up my mud to my computer and used my computers search features. Hasn't failed me yet.


That's actually what I do too. I code on my hard-drive in EditPlus, then upload my changes and compile. I find that to be a lot easier.

Grep is handy in that you get the exact line of the file, but a search within a text editor can find things easily and quickly enough.
21 Jan, 2009, Venrexx wrote in the 24th comment:
Votes: 0
Yeah I use boxer text editor for my editing, I find it to be easy and its functions work perfectly for me in anything I need to use it for. Never heard of EditPlus, I will be looking into that…
21 Jan, 2009, Hades_Kane wrote in the 25th comment:
Votes: 0
I like EditPlus for a number of reasons, particular the syntax highlighting and everything. It makes reading code quite a bit easier when you have color output helping denote certain things you might need to check for.

Like if in a sprintf or send_to_char, you forget a " then you'll notice quite quickly because most of the text on the page will be pink, or if you forget to close out a comment, that'll be obvious because most of the page will be green.
21 Jan, 2009, Kayle wrote in the 26th comment:
Votes: 0
Hades_Kane said:
I like EditPlus for a number of reasons, particular the syntax highlighting and everything. It makes reading code quite a bit easier when you have color output helping denote certain things you might need to check for.

Like if in a sprintf or send_to_char, you forget a " then you'll notice quite quickly because most of the text on the page will be pink, or if you forget to close out a comment, that'll be obvious because most of the page will be green.


I use Visual Studio for the same reason. Oh. And because IntelliSense will give me options for class members or member functions based on the letters I type after the . or ->
21 Jan, 2009, The_Fury wrote in the 27th comment:
Votes: 0
Like Kayle i prefer a full blown IDE, in linux i use Kdevelop or Netbeans and in windows Netbeans or Eclipse. The benefit of using a full blown IDE is that you get syntax highlighting, block collapsing, brace matching, source formatting, integrated grep searches with 1 click to open to that line, and a whole lot more other things that using them worth while to me.
21 Jan, 2009, David Haley wrote in the 28th comment:
Votes: 0
Venrexx said:
I try reading the books and then I realise that most of the actual commands they use and teach you with have no standing in the actual code

That means that you're trying to go too fast. Books will never teach you how to solve specific problems in a MUD, however, you will learn about the various building blocks that you can later assemble yourself to solve whatever problem you are facing. Reading a foreign language textbook will not teach you how to write a specific novel, but it will teach you how to write the sentences to write that novel, if that makes any sense.

Venrexx said:
I can get good at this I just have a different way of learning and it is the only way I CAN learn :(

I think you're being a little hard on yourself, just go with the flow, keep an open mind, try to be patient and don't think you will succeed very quickly because this takes time for everybody.
21 Jan, 2009, David Haley wrote in the 29th comment:
Votes: 0
And to MB admins: pls to fix forum formatting? Kthxbai :tongue:
21 Jan, 2009, quixadhal wrote in the 30th comment:
Votes: 0
Venrexx said:
Grep always confused me


Quote
Immediately, a large toad leaped into her lap and looked at her as if it wanted to be loved. "Grep," it exclaimed.
"Don't mind him," explained the Mad Hacker. "He's just looking for some string."


Read this, all your questions will be answered.

Oh, and my IDE is screen, using vim and ctags, with a side helping of grep, awk, and perl. :)
21 Jan, 2009, Venrexx wrote in the 31st comment:
Votes: 0
Now that was just funny, especially the part about one OS crashing the other lol
22 Jan, 2009, tphegley wrote in the 32nd comment:
Votes: 0
Here's how I use grep whether it's correct or not.

If you were looking for A magical force prevents you from attacking then I would use the following in the src folder:

grep 'A magical force prevents you from attacking' *.c -ni


So the command is basically:

grep ' your text here ' *.c means that you want to search in all the .c files and -ni means that you are going to return the number line and it is going to be case insensitive.

* is a wildcard. If you wanted to search in all the files in the folder then you could just use the * without the .c at the end. If you just wanted to look in mud.h then you would do:

grep 'your text' mud.h -ni


Hope that helps.
22 Jan, 2009, quixadhal wrote in the 33rd comment:
Votes: 0
Just to expand on tphegley's suggestions, to grep through a whole directory hierarchy, GNU grep supports the -R flag for recursion. If your grep doesn't you can also do something like:

Quote
find . -type f | xargs grep -ni 'A magical force'


That's assuming you don't use spaces in your filenames… you don't, do you? Every time someone uses a space in a filename, a windows machine somewhere on the planet crashes.
22 Jan, 2009, Venrexx wrote in the 34th comment:
Votes: 0
Nope I never use spaces on filenames.
20.0/34