|
rdiniz Newbie
Joined: 21 Jan 2017 Posts: 2
|
Posted: Sat Jan 21, 2017 12:59 am
#EXEC on function sending an extra carriage return |
Hello all,
I have a function that when called by a trigger, color the line of the mud, pretty simple.
For that, I'm doing this on the function:
#EXEC #COLOR "hi,green"
The line does get colored as I want, but the problem a blank line is sent to the mud as well, and I don't want that. How can I avoid it?
Thank you. |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: Sat Jan 21, 2017 2:04 pm |
There is no reason to use #EXEC in that instance, i suspect that to be the issue.
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Sat Jan 21, 2017 6:01 pm |
The blank line might be caused by how you are calling the function. An alias would likely be a better solution for what you are doing, but that does not make using a function wrong. If you have the function call by itself on a line then CMud will send the results of the function to the mud, in this case a null result. The right way to use a function without sending anything anywhere is with the #CALL command.
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
rdiniz Newbie
Joined: 21 Jan 2017 Posts: 2
|
Posted: Sat Jan 21, 2017 11:59 pm |
Thank you Vijilante, using the same logic on an alias worked like a charm for what I wanted
Shalimar, the effect without #EXEC was the same, probably by the cause Vijilante posted after. Thank you too. |
|
|
|
|
|