Several problems

Posted by Edgeofforever on Thu 28 Oct 2004 03:39 PM — 7 posts, 30,735 views.

#0
I am having several problems with my smaug code modifications and also a perhaps simpler problem.

1: How would I create a random prog that selects a character at random from a room and then transes them? I tried:

if isGood($r)
mptrans $n <roomnum>
endif

and that didnt work. I assumed that if I replace the $n with a second $r, it would randomly select a second character to trans instead of the first.


2: I am getting a continuing error, random in occurence it seems, but the windows debuggers tells me it is always one of a few lines of code designed to replace normal descriptions etc with morph descriptons. ie:

if (victim->morph != NULL && victim->morph->morph != NULL)

and the same in several other places.

3: My third difficult comes with adding of new wearlocations. I added:

{
"2", "d", 16, 39, "%1.1s", NULL, STRING, 1, "oset %s wear tattoo"
},
{
"2", "d", 16, 64, "%1.1s", NULL, STRING, 1, "oset %s wear orbit"
},

and changed the "2", "d", 16, 64, in the wearloc before that to "2", "d", 16, 24.

all to obj_page_e_data[] in ibuild.c

This has seriously messed up my object making, completely disabling prototype use and various other problems. I would really appriciate help on this.
USA #1
First problem, just use $r again. I'm pretty sure it uses the same char again throughout that prog.

Not sure about new wear place, I've never changed it. Wait for another person to help you out, while I look it over.
Australia #2
There is a thread reciently about wear location problems, there are like 5 different places that you need to add the new wear loc into, take a look at http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=4338&page=1
without reading it all again im pretty sure all the spots were talked about in there.
#3
Thank you for the input, both of you. The first problem is solved, however the link to adding the new wearloc is not working, because it shows nothing about the page data in ibuild.c. The data that is messing up is the problem with the actual online building with 'oset' and the like. I believe the actual text editing works fine and the wearlocs are ok, its just the building interface that is not working.
#4
Well, I've changed some things and now it seems to be working fine... except for the fact that whenever I make a new object it comes up as being flags "haste" instead of prototype... I have no idea why this is.
USA #5
make sure when you add flags and wear locs that they're in the exact same order every where you add them other wise it's going to throw it off a tadd...

#6
I checked the order of things, and it turns out I added a bunch of anitflags before the prototype flag which screwed up the order and gave me the problem. All sorted out now, thanks for all the help everyone.