Jump to content
Asmodeuz

[SOLVED] JIP functionality not working with certain remoteExec

Recommended Posts

Hello,

 

I'm using this

_costTable = compile preProcessFileLineNumbers "folder\costTable.sqf";
[[],_costTable] remoteExec ["spawn",zeusUnit,true];

(from initServer.sqf) to "send" a cost table from dedicated server to the player playing as Zeus.

That little script works nicely at mission start: only units and other "Zeus assets" that are declared in the costTable.sqf are available to the Zeus (player).

 

But for some reason the JIP functionality (which is declared with true) doesn't work. This leads to the point where a reconnecting Zeus player will have all the vanilla Arma 3 Zeus units and assets available since the server doesn't issue the cost table to this "JIP player" like it should. Or should it even?

Any thoughts of a way to get the server to send the cost table to JIP Zeus player?

Share this post


Link to post
Share on other sites

A couple of things. Is the file present in the mission folder/pbo? In that case, don't send the entire script, rather just the path:  [[], "folder\costTable.sqf"] remoteExec ["execVM", ....];

 

Also, your remoteExec is non-sensical. Say zeusUnit is a variable referring to object X. Then remoteExec ["spawn", zeusUnit, true] tells it to run now where X is local, and for future players, if X is local, to also run it. So imagine the player owning X disconnects, now X is deleted. Later, another Zeus player takes the slot and gets the player object Y. When it processes the JIP commands, it sees one pertaining to object X. Well X is not local to the joining zeus player (in fact X is nowhere). So nothing happens.

 

From the BIKI, maybe you want to try remoteExec ["spawn","zeusUnit",true];   notice it is a string now. But I haven't tried that, and the BIKI does not specify whether it only resolves the string once, or each time.

  • Like 1

Share this post


Link to post
Share on other sites

You don't need to do that.

Just compile from the initPlayerLocal.sqf (run by everyone, but locally, without overriding the table of other players))

I guess you have a table at start and Zeus can modify it, and that's the reason why you want to broadcast it.

If so, just do the modifications on Zeus PC then broacast the variable:

 

costTable = [some array]; //or string of code

publicVariable "costTable";

 

then work on PCs with the new array or call compile costTable

 

 

Share this post


Link to post
Share on other sites

Thank you for the replies @Muzzleflash and @pierremgi!

 

I went to first adopt Muzzleflash's version since to me it was easier with "just change this to that" and so on.

Thus I went with

_costTable = compile preProcessFileLineNumbers "folder\costTable.sqf";
[[],_costTable] remoteExec ["spawn","zeusUnit",true];

(notice the change here: zeusUnit changed to "zeusUnit" )

With that small change the JIP functionality is working as I at least was expecting it should.

 

18 hours ago, Muzzleflash said:

A couple of things. Is the file present in the mission folder/pbo? In that case, don't send the entire script, rather just the path:  [[], "folder\costTable.sqf"] remoteExec ["execVM", ....];

 

I think I have to say no to the question whether the file is in the mission folder/pbo.

 

The file is here: /home/username/steamcmd/arma3/folder
I guess some call it a userconfig folder?

Just to test (and maybe learn something in the process) I tried this

[[],"folder\costTable.sqf"] remoteExec ["execVM","zeusUnit",true];

but that only returned Script "folder\costTable.sqf" not found.
But wait, if it's in a "userconfig" folder should I use absolute path in this case?

 

All in all the issue described herein got solved but is the execution efficient that I would not know. Maybe some more knowledgeable can chime in and share "what's cool and what is not".

Share this post


Link to post
Share on other sites

That's the problem. You're using some user folder (userconfig,... perhaps) on server?

You should describe your environment: what is on server, what is on client.

You'd better add the costTable in the scenario, so each client will have it locally. What is your real problem, regardless of your strange solution?

 

Share this post


Link to post
Share on other sites
4 minutes ago, pierremgi said:

That's the problem. You're using some user folder (userconfig,... perhaps) on server?

You should describe your environment: what is on server, what is on client.

You'd better add the costTable in the scenario, so each client will have it locally. What is your real problem, regardless of your strange solution?

 

 

There must be some greater reason why each client should have it locally? In the missions I'm trying to create there is only one Zeus (or as BI apparently puts it: "Curator"). Rest of the players will be running on the ground and being at the mercy of this one Curator.
With cost tables a mission creator can declare only the assets that the Zeus will have in his/hers disposal.
If I add this in the cost table file

_A3_Structures_F_Civ_InfoBoards = ['Land_Noticeboard_F',0,'',0];

that is all what the Zeus will get to place.

Why any other player than Zeus would need to have that information that's declared in such file that this cost table is for?

Share this post


Link to post
Share on other sites

Because it's far better to load the string table on each client, even if not used, instead of throwing one more code to Zeus by network.

And it's far easier.

 

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

×