Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
Users Online
CommonCrawl, Yandex, Google

Members: 0
Guests: 7
Stats
Files
Topics
Posts
Members
Newest Member
481
3,734
19,366
618
Micheal64X
Today's Birthdays
Vintar (28)
Related Links
» SmaugMuds.org » General » General Discussions » Trouble with "Mudprog Variabl...
Forum Rules | Mark all | Recent Posts

Trouble with "Mudprog Variables" snippet
< Newer Topic :: Older Topic > Adding to FUSS

Pages:<< prev 1, 2 next >>
Post is unread #1 Jun 20, 2006, 3:30 pm   Last edited Jun 20, 2006, 3:30 pm by Zeno
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

I've followed this snippet:
http://www.auricmud.com/snippets/variables.html
And added it to my MUD (SmaugFUSS). Now if I wouldn't have already added the snippet, I'd be working on my own code to do this. But anyways, it's not working. If I'm not doing this right (in the prog) let me now.

>speech_prog test
'$n.sex


You say 'test'
Mob says 'Zeno.sex'


Now, it should be saying "male". Any ideas what went wrong? There was some trouble with the instructions, but all the code should be in there.
       
Post is unread #2 Jun 21, 2006, 11:57 am
Go to the top of the page
Go to the bottom of the page

Dragona
Fledgling
GroupMembers
Posts26
JoinedMay 25, 2006

I don't know for sure... but shouldn't you do like:

>speech_prog test
if sex($n) == 1
'$n.male
else
'$n.female






       
Post is unread #3 Jun 21, 2006, 12:00 pm
Go to the top of the page
Go to the bottom of the page

Dragona
Fledgling
GroupMembers
Posts26
JoinedMay 25, 2006

ok maybe I don't know what you are talking about... Conner just explained to me sort of what you wanted... guess I should of kept my mouth shut ... sorry
       
Post is unread #4 Jun 21, 2006, 1:19 pm
Go to the top of the page
Go to the bottom of the page

Gatz
Apprentice
GroupMembers
Posts60
JoinedJul 25, 2005

I know this isn't a very helpfule post, but I know a guy who tried to put this into his MUD and ended up FUBAR'ing it big time. After a week of hair pulling and horrid bugs he gave up. So, if someone could drop a line on how to install this easier and/or get it working, I think I'd give it a shot and try to put it in my game too.
       
Post is unread #5 Jun 21, 2006, 2:25 pm   Last edited Jun 21, 2006, 2:25 pm by Conner
Go to the top of the page
Go to the bottom of the page

Conner
Sorcerer
GroupMembers
Posts870
JoinedMay 8, 2005

Dragona said:

ok maybe I don't know what you are talking about... Conner just explained to me sort of what you wanted... guess I should of kept my mouth shut ... sorry


It never hurts to try to offer help or suggestions. And, who knows, in this case this snippet is enough of a mystery at this point that even what you suggested might just work in the long run better than what it's "supposed to" be doing.
       
Post is unread #6 Jun 21, 2006, 3:20 pm
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

Gatz said:

I know this isn't a very helpfule post, but I know a guy who tried to put this into his MUD and ended up FUBAR'ing it big time. After a week of hair pulling and horrid bugs he gave up. So, if someone could drop a line on how to install this easier and/or get it working, I think I'd give it a shot and try to put it in my game too.


Looks like we're on a quest then. Whee. I did some debugging back when I installed this, so I'll post some of my results in a bit.
       
Post is unread #7 Jun 21, 2006, 4:47 pm
Go to the top of the page
Go to the bottom of the page

Halcyon
Magician
GroupMembers
Posts187
JoinedApr 12, 2005

Wow, I can't tell if the directions are either about as clear as MUD, or if what I'm looking at could be misconstrued as directions. I honestly don't understand for the life of me how it's actually supposed to work. I *thought* I did, but... The more I thought about it, the less sense it made.
       
Post is unread #8 Jun 21, 2006, 6:39 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,873
JoinedJul 26, 2005

Well, decided to take a look at it and can't say it was that enjoyable to look at. It has alot of stuff it probably doesnt need and doesnt actually give a good idea of how its suppose to work at the top of the snippet. The example shows that the way Zeno did it should work, but he found it to not do what it should. I think who ever did it should at least give alot better directions on it or make the code easier to look at so someone can be willing to take the time to fiqure out how it should work :) Just my 2 cents, ok .2 cents lol :)
       
Post is unread #9 Jun 21, 2006, 7:21 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,643
JoinedJan 1, 2002

Eos likes to include alot of stuff in his code to make it work the way he likes that he then forgets to mention when he releases snippets from it. The prog variables code is a classic example of this based on several of the functions he's using in it which do not exist in stock code.

And although it's been awhile since I last looked at it, I don't recall the instructions for installing it being anything but complete confusion. So that can't be helping things any.

It's a nice concept, and I'd probably use it if I had the time to sit around and debug what he's made.
       
Post is unread #10 Jun 21, 2006, 7:22 pm   Last edited Jun 21, 2006, 7:22 pm by Zeno
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

Here's some of my debugs:

You say 'test'
Log: [*****] BUG: parse_setvar: setting sex string.
Mob says 'Zeno.sex'

In parse_setvar:
             if (!str_cmp( word, "sex";))
             {
                 if (chkchar->sex == 2)
                   strcat( results, format( "%s", "female" ));
                 else
                   strcat( results, format( "%s", "male" ));
                bug( "parse_setvar: setting sex string." );
             }


So the function is working just fine. Which means, something has to be wrong here:
  str = parse_setvar( str, mob, actor, obj, vo, rndm );
  /* This chunk of code taken from mprog_process_cmnd. */
  while ( *str != '\0' )
  {
    if ( *str != '$' )
    {
      *point++ = *str++;
      continue;
    }
    str++;
    mprog_translate( *str, tmp, mob, actor, obj, vo, rndm );
    i = tmp;
    ++str;
    while ( ( *point = *i ) != '\0' )
      ++point, ++i;
  }
  *point = '\0';

Right? Anyone see anything wrong there?
       
Post is unread #11 Jun 21, 2006, 7:41 pm
Go to the top of the page
Go to the bottom of the page

Conner
Sorcerer
GroupMembers
Posts870
JoinedMay 8, 2005

For what it's worth, I dropped Eos an email asking him to swing by here and see if he can lend a hand to this dicussion.. before it gets too much more colorful. ;)
       
Post is unread #12 Jun 21, 2006, 11:35 pm
Go to the top of the page
Go to the bottom of the page

Conner
Sorcerer
GroupMembers
Posts870
JoinedMay 8, 2005

Ok, got an answer from Eos, though apparently he won't come by here himself, or at least won't post himself in order to avoid offending Samson. *shrug* -I'm not a party to whatever that was about, and I'm sure it was long ago enough that the odds are neither of them even really remembers what it was about.. and I'd just assume not know more than I do about it. ;)

Anyway, he said that he'd try to clean up and update that snippet in the next few days, but in the meantime the snippet is based on some really outdated code and may not be bugfixed to understand that ' is a shortcut for say rather than treating it as an indicator for multi-word, so he suggested that you might try using say instead. He also said that in the case of this snippet, it's actually got three different systems in there that were too messy to separate easily, adding to the confusion, as well as the fact that when he snippetized it he'd been having trouble determining which parts were original smaug versus underlying changes to Auric mud, so there may be some parts missing that needed to be there. Finally, he also said that the snippet appears to be missing a line and that you need to find:
switch( cmnd[x+1])
and right above that add (in parse_setvar) add
if( cmnd[x] == '$' )
making the switch conditional.

I hope some of that helps, Zeno, if not, then check his site in a few days and see if the snippet has been updated. *shrug*
       
Post is unread #13 Jun 22, 2006, 4:39 pm
Go to the top of the page
Go to the bottom of the page

Conner
Sorcerer
GroupMembers
Posts870
JoinedMay 8, 2005

Apparently there was more wrong than initially appeared, the rewritten version is available at http://auricmud.com/snippets/FUSS_Variables.html
       
Post is unread #14 Jun 22, 2006, 5:32 pm
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

The new snippet worked fine, tell them thanks if anyone sees Eos. :)
       
Post is unread #15 Jun 23, 2006, 1:40 am
Go to the top of the page
Go to the bottom of the page

Conner
Sorcerer
GroupMembers
Posts870
JoinedMay 8, 2005

Will do! :)
       
Post is unread #16 Jun 27, 2006, 6:57 pm
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

I think I found a bug. After installing this snippet, it "breaks" certain variables. Like $t.
say $t

Mob says 't'


It seems to be parsing out the $, and just saying t. Instead of saying the variable.

       
Post is unread #17 Jun 27, 2006, 10:56 pm
Go to the top of the page
Go to the bottom of the page

Conner
Sorcerer
GroupMembers
Posts870
JoinedMay 8, 2005

Relayed to Eos, Zeno, but you really should prolly post these to his forums at www.auricmud.com/forum/index instead, that way he would be able to respond directly himself.
       
Post is unread #18 Jun 28, 2006, 6:12 am
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,643
JoinedJan 1, 2002

Eos shouldn't feel like he's going to offend me just by posting here. Our "feud" from back in the day is long since over and I had assumed neither of us was still holding a grudge or any hard feelings about it. In either case it's probably better to post the issue on his forum since it deals with his code, just as an issue with Smaug wouldn't really be appropriate to post in a Rom forum :)
       
Post is unread #19 Jun 29, 2006, 11:12 am
Go to the top of the page
Go to the bottom of the page

Conner
Sorcerer
GroupMembers
Posts870
JoinedMay 8, 2005

Well, whatever the case, Eos emailed me his reposnse to this for Zeno, so here's what he had to say:
After you and Samson both suggest he comes to my forums, still nothing. Nice.

Considering $t is NULL in most forms of trigger, um, duh?
In stock all it will yield is "someone", because it's always NULL. It can be safetied to prevent misuse by editing the 't' case in parse_setvar
	   case 't':
            chkchar = (CHAR_DATA *)vo;
            if (!chkchar) // Used $t where $t was impossible.
               chkchar = actor; // can use actor or rndm if you prefer.
           break;

In fact, as often as builders are clueless about the proper usage of $n, $r, and $t, I safetied all of mine:
	   case 'n':
            chkchar = actor;
            if (!chkchar)      // Used $n where they should've $r'd
              chkchar = rndm;
            break;
	   case 't':
            chkchar = (CHAR_DATA *)vo;
            if (!chkchar) // Used $t where $t was impossible.
              chkchar = actor; // can use actor or rndm if you prefer.
            break;
	   case 'r':
            chkchar = rndm;
            if (!chkchar)
              chkchar = actor;  // Used $r where they should've $n'd
            break;
       
Post is unread #20 Jun 29, 2006, 1:18 pm
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

I'm on vacation here, a bit hard to get online. I didn't know he had a forum before Conner told me. I'll be sure to post there when I get back if I have more issues.
       
Pages:<< prev 1, 2 next >>