Jump to content

Recommended Posts

I'm making a simple mission for a friend and myself which I will host. I have an image I want to make sure my client can see. I am firing a script which contains the following line:

hint parseText "Who<br/><img size= '5' image='pic\man.jpg'/><br/>is it?" call BIS_fnc_MP;

I know call BIS_fnc_MP is suggested to not be used any more but how do I remoteExec this or will call BIS_fnc_MP still work?

Or will hint parseText already be sent to client without MP in mind?

Share this post


Link to post
Share on other sites

BIS_fnc_MP should really not be used anymore. remoteExec is the way to go. Normally you would do a hint like this:

"Hint message" remoteExec ["hint", 0];

BUT in this specific case you have to send over the structured text (parsed text) which is not supported ( @Schatten ) :

Quote

This type is not meant to be used with remote execution. Executing


parseText "test" remoteExec ["hint", 0];

will result in the following rpt message:
Performance warning: SimpleSerialization::Write 'params' is using type of ',TEXT' which is not optimized by simple serialization, falling back to generic serialization, use generic type or ask for optimizations for these types

Parse the text on the receiving client instead.

 

https://community.bistudio.com/wiki/Structured_Text

 

So instead you will have to do one of the following things:

A) remote call a function

For this you will have to declare a function (CfgFunctions, global variable) with the code to show the hint:

TAG_fnc_manHint = {hint parseText "Who<br/><img size= '5' image='pic\man.jpg'/><br/>is it?";};

and when you want to show the hint:

[] remoteExec ["TAG_fnc_manHint", 0]

B) directly remoteExec the call

This method is worse performance/net usage wise but for a small scenario with not too many calls and no server security concerns: eh, who cares.

[[], {hint parseText "Who<br/><img size= '5' image='pic\man.jpg'/><br/>is it?"}] remoteExec ["call", 0];

 

  • Like 2

Share this post


Link to post
Share on other sites

@7erra, thanks for the clarification.

It's possible to use this simplified code:

{ hint parseText "Who<br/><img size='5' image='pic\man.jpg'/><br/>is it?"; } remoteExec ["call"];

 

  • Like 2

Share this post


Link to post
Share on other sites
1 hour ago, 7erra said:

[[], {hint parseText "Who<br/><img size= '5' image='pic\man.jpg'/><br/>is it?"}] remoteExec ["call", 0];

 

Thanks guys. I'll give this one a go and hope he sees it.

I have no way of testing with a client without giving up parts of what the mission is about and I don't want to do that. 😉

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×