• 0
Sign in to follow this  
Knocks

Generating toast messages from headless client to all players

Question

I am trying to add a toast notification to the FuMS add-on and I'm having trouble with toasts.  I have added this code to the SpawnNotification.sqf file (Generates the mission notifications to players).  This runs on the client side as the headless client.  Headless client is running on same hardware.  Using latest version of all software and add-ons.

Spoiler

		["toastRequest", ["InfoTitleAndText", ["TestToast!", "Holy crap its working."]]] call ExileClient_system_network_send;

 

but I get this on in the headless client RPT file

Spoiler

 9:37:51 Error in expression <] call BIS_fnc_param;
_publicMessage = [ExileClientSessionId, _messageName, _mes>
 9:37:51   Error position: <ExileClientSessionId, _messageName, _mes>
 9:37:51   Error Undefined variable in expression: exileclientsessionid
 9:37:51 File exile_client\code\ExileClient_system_network_send.sqf, line 15

 

This is the code trying to run

Spoiler

/**
 * ExileClient_system_network_send
 *
 * Exile Mod
 * www.exilemod.com
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. 
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
 */
 
private["_messageName", "_messageParameters", "_publicMessage"];
_messageName = _this select 0;
_messageParameters = [_this, 1, [] , [[]] ] call BIS_fnc_param;
_publicMessage = [ExileClientSessionId, _messageName, _messageParameters];
_publicMessage remoteExecCall ["ExileServer_system_network_dispatchIncomingMessage", 2];
_publicMessage = nil;

 

Oddly enough these don't work either, I think it throws the same error:

Spoiler

From the example site, and none work for the same issues I believe
  
  ["InfoTitleAndText", ["Snap Mode", "Look at the object you want to snap to, press SPACE to lock on it and then move your object next to a snap point. Press SPACE again to place the object."]] call ExileClient_gui_toaster_addTemplateToast;

["SuccessTitleAndText", ["Placed safe!", "The PIN has been set to 0000."]] call ExileClient_gui_toaster_addTemplateToast;

["ErrorTitleAndText", ["Failed to repair!", _exception]] call ExileClient_gui_toaster_addTemplateToast;

["ErrorTitleAndText", ["Construction aborted!", "You cannot build during a combat."]] call ExileClient_gui_toaster_addTemplateToast;

["ErrorTitleOnly", ["Your knife broke!"]] call ExileClient_gui_toaster_addTemplateToast;

["SuccessTitleAndText", ["Family registered!", format ["-%1<img image='\exile_assets\texture\ui\poptab_inline_ca.paa' size='24'/>", _registrationFee]]] call ExileClient_gui_toaster_addTemplateToast;

["<t size='22' font='PuristaMedium'>Hello, World!</t>", [1, 0, 0, 1]] call ExileClient_gui_toaster_addToast;

 

 

I'm guessing but I think the problem is that variable ExileClientSessionId Is not defined on headless clients.  I could check by trying to send it to the RPT log just before my call but this is the only thing that makes sense.  I need to know what that variable normally points to so that I can fake it on the HC or figure out what attribute from the HC to send to get this to work.  I think I'm missing something simple. 

I've already seen this article but if I missed something please let me know.

https://www.exilemod.com/wiki/developer-toolbox/network-messages-r2248/

Thanks for any ideas anyone has.

Edited by Knocks
typo

Share this post


Link to post
Share on other sites

0 answers to this question

There have been no answers to this question yet

Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.