Author Topic: Silent transmitdatablocks();  (Read 2464 times)

Is there anyway to submit a silent transmitdatablocks();?

I remember some code was being tossed around and I saved something that might do the trick on my hard drive but I can't find it.

There's no point in doing it silently.

I think all transmitDatablocks() does is loop through all the clients and does %client.transmitDataBlocks("1"); on them. So yeah I guess you can do it silently.

Why are you trying to re-send datablocks?

Couldn't you just package the function?
Wait nvm. My brain returned to active duty.

I think all transmitDatablocks() does is loop through all the clients and does %client.transmitDataBlocks("1"); on them. So yeah I guess you can do it silently.

this is the correct answer

or package messageAll or something to prevent it from saying whatever exact message transmit datablocks sends

Code: [Select]
      Entering MessageAll(88, Transmitting Datablocks...)
         Entering messageClient(13966, 88, Transmitting Datablocks..., , , , , , , , , , , , , )
         Leaving messageClient() - return
      Leaving MessageAll() - return
   Leaving transmitDataBlocks() - return
I'll try to do something.

or package messageAll or something to prevent it from saying whatever exact message transmit datablocks sends

But crown already posted the solution, there is no need for an inefficient package


function silentTransmitDatablocks()
{
    %count = clientGroup.getCount();

    for(%i = 0; %i < %count; %i++)
    {
        clientGroup.getObject(%i).transmitDatablocks(1);
    }
}

A whole other function sounds tedious.

Code: [Select]
package NoTransmitDatablocksMessage
{
function MessageAll(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10, %a11, %a12, %a13)
{
if(%msgString $= "Transmitting Datablocks...")
return;

// talk(%msgtype SPC "%msgtype");
// talk(%msgstring SPC "%msgstring");
// talk(%a1 SPC "%a1");
// talk(%a2 SPC "%a2");
// talk(%a3 SPC "%a3");
// talk(%a4 SPC "%a4");

// Debug

parent::MessageAll(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10, %a11, %a12, %a13);
}
};
activatepackage(NoTransmitDatablocksMessage);

This package makes messageclient crash. What is wrong with it?

Generally you should never attempt to modify messageAll (not to mention that you have the wrong number of args). There is pretty much always a better option.
An extra 5 line function is infinitely better than a new package which attempts to modify the behavior of messageAll to globally filter out messages based on text.

Okay, I won't then, but still, what should be modified? For the sake of learning.

Please don't package messageAll. Use Crown's solution.

Okay, I won't then, but still, what should be modified? For the sake of learning.

Nothing should be modified. Just create a function like Crown's suggestion.