|
hpoonis2010 Adept
Joined: 18 Jun 2019 Posts: 279
|
Posted: Tue May 12, 2020 10:21 am
How to prevent script output echoing to MUD |
I have an alias which runs a loop.
It ticks down from current level to 1 and performs disabling of portals via the %portalenabled command.
In the main MUD window the actions of the script are shown. Ie., the function returns are sent to the mud.
Loop 130 down to 1 all the following is sent to the mud for some reason.
1
1
1
1
1
1
0
0
-1
How to prevent this from happening? When this gets sent to the mud it obviously tries to perform some actions that do not exist and I just see a bunch of 'There is no such command' type of message. |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4662 Location: Pensacola, FL, USA
|
Posted: Wed May 13, 2020 1:52 am |
Odds are you have the echo in your own code for the purpose or value-testing somewhere.
Are you using #CALL or #NOOP to run your functions or some other command?
I can't really proofread the code without it being here. |
|
_________________ Discord: Shalimarwildcat |
|
|
|
hpoonis2010 Adept
Joined: 18 Jun 2019 Posts: 279
|
Posted: Wed May 13, 2020 9:49 am |
Code: |
#FORALL @portlist {%portalenabled(%i,0);#DELITEM portlist %i}
#LOOP 200,0 {#T- P%i}
#LOOP 1,@curlev {#T+ P%i} |
Sorry.
The looped output goes to the command window. Specifically, I believe, it is the return from the %portalenabled function, and that is included in the loop. This is going to happen with EVERY function available in the scripting language, as every function returns a value.
There must be some way of dumping that return value so it does not get sent to the window. |
|
|
|
chaossdragon Apprentice
Joined: 09 Apr 2008 Posts: 167
|
Posted: Wed May 13, 2020 12:03 pm |
I could be wrong but two options I would consider is under Options > General > Scrypting tab, uncheck echo output, or use #SENDRAW {command}
|
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4662 Location: Pensacola, FL, USA
|
Posted: Wed May 13, 2020 12:36 pm |
Yea, you want to #CALL your functions, it throws away the results rather than trying to send them to the mud server.
#FORALL @portlist {#CALL %portalenabled(%i,0);#DELITEM portlist %i} |
|
_________________ Discord: Shalimarwildcat |
|
|
|
hpoonis2010 Adept
Joined: 18 Jun 2019 Posts: 279
|
Posted: Wed May 13, 2020 8:28 pm |
Thanks. That worked a treat.
|
|
|
|
|
|