I have changed nothing as far as flags go, all I did in the code recently was change a few variables for levels, some colors, what all was listed in these forums and such… room flags werent touched. As for errors, I get about as many errors as I possibly can without the shell telling me directly to stop hurting it :(
20 Jan, 2009, David Haley wrote in the 22nd comment:
Votes: 0
Venrexx said:
I have changed nothing as far as flags go
+
Venrexx said:
Last night I tried re-adding the nopk flags but it didn't work
Yeah the flag I tried adding didnt work because all I did was try adding along side all the flag listings "nopk" and didnt code in what it did, thats why I pulled up all the errors. I dont understand the flag systems so I dont know how to code it in. I removed it so nothing is changed.
If I can I would like to set the safe flag to allow you to Pkill but report it to the system as an illegal player kill, I will add that question in another post though.
should work as it is telling it to hell for 2 hours…
No it wont work, but your most of the way there to understanding what you have to do, firstly ch must be a valid character calling the function, ch would be the immortal issuing the punishment, if where you have the call the do_hell ch is not valid then you will crash, i think you can use supermob in this instance if ch is not valid. The next bit, tells you you need a string, and that string has to be in the correct format for it to work right, others have already shown you what to do there, but remember, most do_FUNCTIONS, all have the same formula ch, arg where arg is always a text string.
"sprintf(buf, "%s 2 hours", ch->name);" being what tells the code the definition of buf and the "%s" "and ch->name" lnk together to tell the game that %s is in place of the characters name. so thats tring is saying hell <name> 2 hours. The next line "do_hell(ch, buf);" is telling the game to execute the above parameters. (sorry if my wordingf or it is off, I know computer talk better than code talk lol).
Actually, if you can read the code, you can find what you need to do within the output of grep. If your not able to do that, then maybe your not at an advanced enough level to be doing the things that you are wanting to do. Ignoring the output from mud_comm.c, in my old smaug base there are about 30 lines of code you need to read through to find how to use supermob.
21 Jan, 2009, Ssolvarain wrote in the 35th comment:
Votes: 0
Pseudocode is a good starting point.
Simple to learn and pretty invaluable if you're trying to learn to code. You can't really learn by example or comparison if you have no idea what's really going on.