Home   Help Search Login Register  

Author Topic: reserved variable "missionstart"  (Read 1124 times)

0 Members and 2 Guests are viewing this topic.

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
reserved variable "missionstart"
« on: 06 May 2003, 20:29:52 »
I am trying to implement the reserved variable array "Missionstart", so that on the outro, the time the mission was started on the server is displayed with the final score

Using a clients missionstart time, i get some success, but when i try to do it from the server i get the scalar bool array message for every element of the "serverstart" array that i created

missionstart is a reserved array and the elements it contains within are
 [year, month, day, hour, minutes, seconds]

i tried to do a resize command to get rid of the seconds , but it wouldnt, so instead i opted to extract the relevant elements and reorder them in a different array

This is a copy of the relevant statements in my init.sqs
********************************************************************
Init.sqs entries

?(local Server):serveryear = missionstart select 0
?(local Server):servermonth = missionstart select 1
?(local Server):serverday = missionstart select 2
?(local Server):serverhour = missionstart select 3
?(local Server):serverminute= missionstart select 4
serverstart = Format["%1 of the %2 %3 at %4 hrs %5 minutes",serverday, servermonth, serveryear, serverhour, serverminute];publicvariable "serverstart"
*********************************************************************

and then outputted during the "Final score screen" is the following


?(WScore>EScore):titletext[format["%1\n started on server at \n%2\n<<< FINAL SCORE >>>\nWEST WINS!\nEAST %3    <-->    WEST  %4",mapname,serverstart,EScore,WScore],"PLAIN"]

?(EScore>WScore):titletext[format["%1\n started on server at \n%2\n<<< FINAL SCORE >>>\nEAST WINS!\nEAST %3    <-->    WEST  %4",mapname,serverstart,EScore,WScore],"PLAIN"]

?(EScore==WScore):titletext[format["%1\n started on server at \n%2\n<<< FINAL SCORE >>>\nTied Game!\nEAST %3    <-->    WEST  %4",mapname,serverstart,EScore,WScore],"PLAIN"]
*******************************************************************************

As i said , if i remove all the ?(local server) . it runs fine and displays my client time accurately when un pbo'd (In editing form preview)
when pbo'd it shows my  time as midnight on 1, 1 1970 for some reason


If there is no problem with the coding, then is it because
1) It doesnt work on a Linux server?

my client is a win XP o/s


Could someone with access to a WIN dedicated server check this for me

******************************************************************************************

If anyone is wondering why i need to do this

Its part of a final score report screen for a league competition map, so screenshots can be offered if there's a conflict over final score results. Obviously, these screenshots ideally need the same date and time stamp, hence extracting this info from the server
« Last Edit: 06 May 2003, 23:39:33 by Terox »
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:reserved variable "missionstart"
« Reply #1 on: 14 May 2003, 21:43:37 »
What an idiot, have solved problem, i forgot to make all server variables public

eg

?(local Server):serveryear = missionstart select 0;publicvariable "serveryear"
?(local Server):servermonth = missionstart select 1;publicvariable "servermonth"
?(local Server):serverday = missionstart select 2;publicvariable "serverday"
?(local Server):serverhour = missionstart select 3;publicvariable "serverhour"
?(local Server):serverminute= missionstart select 4;publicvariable "serverminute"
serverstart = Format["%1 - %2 - %3 at %4 : %5 Hrs",serverday, servermonth, serveryear,
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123