Home   Help Search Login Register  

Author Topic: Linux and Windows server issue  (Read 1949 times)

0 Members and 1 Guest are viewing this topic.

sasyboy

  • Guest
Linux and Windows server issue
« on: 28 Sep 2005, 16:17:50 »
You know sometimes I write scripts and in Windows is the dogs but in Linux it turns into rat drops.  Any ideas on what can cause problems in scripting on a Linux dedicated server so they can be avioded?

Proberbly me just having a brain fart again.

sasyboy

  • Guest
Re:Linux and Windows server issue
« Reply #1 on: 28 Sep 2005, 16:22:55 »
Hummm just though I'ld clear up something that may cause confusion.

(1) I'm making the mission on my PC.  (2) Hosting a new server with this mission on the PC and playing it on it.  (3) Moving it over to my dedicated linux server and playing as a client on my PC.

(3) Dosn't work as expected.

Maybe it's because when I do (2) the client is acting as the server but when I do (3) some information isn't on the client or something.  Just guessing.  ???

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:Linux and Windows server issue
« Reply #2 on: 28 Sep 2005, 17:10:59 »
it wont be a linux, windows issue, it will be a local server or local player scripting issue.

You would need to be a bit more forthcoming with the actual problem and also supply the script that is causing the problem, including an explanation of how it is executed and what variables are being passed to the script from where and how
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

sasyboy

  • Guest
Re:Linux and Windows server issue
« Reply #3 on: 28 Sep 2005, 17:52:40 »
Aye thanks just done some reading at :-
http://www.ofpec.com/yabbse/index.php?board=7;action=display;threadid=22956

Think you're right and it's obviously because I'm testing the mission first on the none-dedicated server.

As you say it looks like a public / local problem.

The script is executed by the player and then makes animations of targets poping up and down.  When the targets are shot a score is recoreded with a restult.  getDammage has a rounding error if the target is not local which in this instance it isn't local.

My plan is to make the script execute via a triger but the first line will be:-
? !(local server) : exit
This should ensure that the script will only run on the server so animations are seen by all then I'll publicVariable the score to everyone.

For ? !(local server) : exit so you know if I have to have a gameLogic called server in the mission.  I hope not because it's part of an addon.  Also if you do could I get away with ?!(isNull player) : exit?

Good knows if this stuff will work but I can only hope as I'm at work now.  I'm sure an OFPolic.  ;D

Provide more details later as I learn from my mistakes. Thanks for all help / comments.

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:Linux and Windows server issue
« Reply #4 on: 28 Sep 2005, 18:06:31 »
to use

?(local server):
Yes you need a gamelogic named "server"

Gamelogics are local to the server only, so using one which you name server, is the normal done thing in mission making for specifying dedicated server code.

If this is for an addon, then instead you can
count playerside for east west, resistance & civilian

where the returned value is 0, then you have your dedicated server

And you shouldnt rely on any mission editor to read your readme and create a trigger, there is no need anyway and the above system will work around that

Other options are

?(local player):
?!(local player):
the problem with the above may be that your script might not work as intended when running a player/server configuration, eg the MP editor
« Last Edit: 28 Sep 2005, 18:08:51 by Terox »
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

sasyboy

  • Guest
Re:Linux and Windows server issue
« Reply #5 on: 28 Sep 2005, 18:59:07 »
Thanks that's greate help.

I'll try when I get home here till 21:00  :'(

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Linux and Windows server issue
« Reply #6 on: 28 Sep 2005, 22:46:20 »
i wouldn't check for local player, as someone could be hosting it on their computer and playing from that computer, in which case player would not be null, thus exiting the script everywhere
« Last Edit: 28 Sep 2005, 22:46:47 by Triggerhappy »

sasyboy

  • Guest
Re:Linux and Windows server issue
« Reply #7 on: 29 Sep 2005, 09:29:27 »
aye good idea.  I've decided to opt for isNull Player approch.  I know all the missions I make with this addon will be on a dedicated server.

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Linux and Windows server issue
« Reply #8 on: 30 Sep 2005, 01:35:30 »
thats no better. my reasoning is that checking for players to find the server is a bad idea, as the server could have a player as well. use the gamelogic called server, its the only sure-fire way