Jump to content
Sign in to follow this  
AAD10 Pete

publicVariable Server-Problems

Recommended Posts

Sometimes I got the problem on dedicated servers that if I do several publicVariable"xy"; commands almost at once, the sqf script can crash and the publicVariable command won't get executed... With bad results for the other players on the dedicated server...

Is there something like a waitUntil command for the publicVariable"xy" script command? Or how could I avoid this problem?

There are no changes if I put a sleep x; command between two pubicVariable"xy"; commands...

Thx for help.

======= Example: ===========

//Task updaten

UpdateTask7 = 1;

//Ziel abhaken

Ziel6 = 1;

CommAllZiel6 = 1;

//Am Schluss machen, Absturzgefahr für Script

publicVariable "Ziel6";

Sleep 0.2;

publicVariable "UpdateTask7";

Sleep 0.2;

publicVariable "CommAllZiel6";

Share this post


Link to post
Share on other sites

Can you explain more in detail what you mean with

... the sqf script can crash ...

I've not yet seen a script stop working on its own because of other reasons than wrong syntax or type mismatch.

And your code looks fine to me.

Share this post


Link to post
Share on other sites
Can you explain more in detail what you mean with

I've not yet seen a script stop working on its own because of other reasons than wrong syntax or type mismatch.

And your code looks fine to me.

Thanks for your answer.

I mean the following:

If I have several publicVariable"xy"; Script commands after each other somewhere in a .sqf script and the script get executed almost at the same time on several clients, the script can crash and stop going on. Maybe a problem if several clients execute the same publicVariable"xy"; script command almost at the same time...?

I have this Problem only, if I write several publicVariable"xy"; Script commands after each other in the same .sqf script. So far I had had no problems if there is only one publicVariable"xy"; script command at once in a .sqf script.

Share this post


Link to post
Share on other sites
Maybe a problem if several clients execute the same publicVariable"xy"; script command almost at the same time...?

Possibly.

Ehm, why would you want to do something like this? They are overwriting each others values.

Try to avoid the quoted situation and rearrange your mission layout in such a manner that an event that needs to be published, is only published by the machine, where the event has happened on (regarding locality). If in doubt, then chose the server to do it.

Edited by dengibtsschon

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
Sign in to follow this  

×