Jump to content
Sign in to follow this  
Hellop

server.cfg scripting error  need example code

Recommended Posts

The wiki example for server.cfg has a line of code:

onUnsignedData="server globalChat format['Player %1 is using unsigned data.', (_this select 0)];"; // unsigned data detected

The server side scripting page says the first argument for these security checks is the User ID.

So, the code should work when used in regularCheck or onUnsignedData. I move it to regular check and get an error at the "server" keyword. If I change "server" to "player" I get an error at "globalChat". I've tried changing the single quotes to double-double quotes: "".

Can anyone provide examples of working code for the security checks in server.cfg?

Share this post


Link to post
Share on other sites

You cannot interact with the running game from the serverside scripting engine.

What do you want to achieve with this scripting?

Share this post


Link to post
Share on other sites
You cannot interact with the running game from the serverside scripting engine.

What do you want to achieve with this scripting?

Hi, thanks for the reply. I just want to achieve what is in the wiki. Here's the URL:

http://community.bistudio.com/wiki/server.cfg

At the bottom of that link there is this line:

onUnsignedData="server globalChat format['Player %1 is using unsigned data.', (_this select 0)];"; // unsigned data detected

Are you saying the wiki is wrong?

Or is my problem that "server" is not an actual arma keyword?

Share this post


Link to post
Share on other sites

The example is wrong (the current version was provided by Sir hC). I am putting back a sample which works.

The only things (besides of various checks and computations) you can really DO from server side scripts are Kick or Ban (see also Server Side Scripting)

Share this post


Link to post
Share on other sites

Thanks for clarifying this. Looks like you guys fixed the wiki too.

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  

×