Found Small bug

  • JTP
  • Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
More
10 months 3 weeks ago #7056 by JTP
Found Small bug was created by JTP
Small bug found in Stock sing:

You sing to his hi.

It dont take the name i try to sing to, it says his instead of name.
But code clearly says get_name(vict) ?
  half_chop(argument, buf, buf2);

  if (!*buf || !*buf2)
    send_to_char(ch, "Whom do you want to %s.. and what??\r\n", action_sing);
  else if (!(vict = get_char_vis(ch, buf, NULL, FIND_CHAR_ROOM)))
    send_to_char(ch, "%s", CONFIG_NOPERSON);
  else if (vict == ch)
    send_to_char(ch, "You can't get your mouth close enough to your ear...\r\n");
  else {
    char buf1[MAX_STRING_LENGTH];

    if (CONFIG_SPECIAL_IN_COMM && legal_communication(argument))
      parse_at(buf2);

    snprintf(buf1, sizeof(buf1), "$n %s you, '%s'", action_plur, buf2);
    act(buf1, FALSE, ch, 0, vict, TO_VICT);

    if ((!IS_NPC(ch)) && (PRF_FLAGGED(ch, PRF_NOREPEAT))) 
      send_to_char(ch, "%s", CONFIG_OK);
    else
      send_to_char(ch, "You %s %s, '%s'\r\n", action_sing, GET_NAME(vict), buf2);
    act(action_others, FALSE, ch, 0, vict, TO_NOTVICT);

Please Log in or Create an account to join the conversation.

More
10 months 3 weeks ago #7057 by WhiskyTest
Replied by WhiskyTest on topic Found Small bug
There isn't a stock sing command, there is only a social.
The code you've posted is do_spec_comm, it's for asking and whispering.

Can you maybe tell us what commands you are typing and the output you receive?
And the output you are expecting?

Please Log in or Create an account to join the conversation.

  • JTP
  • Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
More
10 months 3 weeks ago #7058 by JTP
Replied by JTP on topic Found Small bug
I tried to use the Stock social sing then.

I typed: sing playername hi

and output was:
You sing to his hi.

Would think output should be: You sing to playername hi.

Please Log in or Create an account to join the conversation.

  • JTP
  • Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
More
10 months 3 weeks ago #7059 by JTP
Replied by JTP on topic Found Small bug
Or else it should atleast be him and not his.

Please Log in or Create an account to join the conversation.

More
10 months 3 weeks ago #7060 by Parnassus
Replied by Parnassus on topic Found Small bug
As Matt said, sing is a social, not a command nor a communication channel. Without checking, it looks to me like a social that uses a qualifier. For instance, you sing to his elbow, his pencil or his sword. Because it's not a communications channel, adding hi does nothing for you. If you take that off, you'll probably see that you're singing to playername.

Since you're trying to write a command for sing, you may have to get rid of the social or find a way of moving the command up higher. Just being a command may automatically raise it above the social, I don't know that sort of thing.

On the other hand, you might want to rewrite the social to reflect the message. I don't know anything on how to do this either. Of course, the message won't go beyond the room.

Please Log in or Create an account to join the conversation.

  • JTP
  • Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
More
10 months 3 weeks ago #7061 by JTP
Replied by JTP on topic Found Small bug
Sing playername

Makes

You seranade him.

Please Log in or Create an account to join the conversation.

More
10 months 2 weeks ago - 10 months 2 weeks ago #7062 by WhiskyTest
Replied by WhiskyTest on topic Found Small bug
Jump into aedit (action edit) and look over the sing social.
Socials can be targeted to bodyparts. I guess so you can do important things like poke someone in the eye...

When you type 'sing playername hi' the social treats it like this:
Jan wants to sing to playername's hi.
It thinks 'hi' is a bodypart, it doesn't treat it like a sentence.
To make sing a way of communicating you'd add it to do_spec_comm like ask/whispering - and remove the social.
aedit sing
Do you wish to edit the 'sing' action? 
y
-- Action editor
n) Command         : sing            1) Sort as Command  : sing           
2) Min Position[CH]: Resting         3) Min Position [VT]: Dead    
4) Min Level   [CH]: 0               5) Show if Invisible: NOT HIDDEN
a) Char    [NO ARG]: You raise your clear (?) voice towards the sky.
b) Others  [NO ARG]: SEEK SHELTER AT ONCE! $n has begun to sing.
c) Char [NOT FOUND]: Sing away no-one will hear.
d) Char  [ARG SELF]: You raise your clear (?) voice towards the sky, serenading yourself.
e) Others[ARG SELF]: SEEK SHELTER AT ONCE! $n has begun to serenade $mself.
f) Char      [VICT]: You serenade $M.
g) Others    [VICT]: $n sings softly to $N.
h) Victim    [VICT]: $n sings you a love song.
i) Char  [BODY PRT]: You sing to $S $t.
j) Others[BODY PRT]: $n sings to $N's $t.
k) Victim[BODY PRT]: $n sings to your $t.
l) Char       [OBJ]: You sing to $p.
m) Others     [OBJ]: $n sings to $p.
q) Quit
Enter Choice:
Last edit: 10 months 2 weeks ago by WhiskyTest.

Please Log in or Create an account to join the conversation.

Time to create page: 1.358 seconds