Welcome to the Builder Academy

Question Found Small bug

More
03 Nov 2017 22:41 #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) ?
Code:
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
04 Nov 2017 00:49 #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.

More
04 Nov 2017 07:56 #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.

More
04 Nov 2017 08:29 #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
04 Nov 2017 14:25 #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.

More
04 Nov 2017 15:24 #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.

Time to create page: 0.333 seconds