Results 1 to 8 of 8

  Click here to go to the first Developer post in this thread.  

Thread: publicVariable problem with Beta-Patches?

  1. #1

    Question publicVariable problem with Beta-Patches?

    Since I run Arma2 version 1.60 with one of the latest betapatches I have always the same problem with using publicVariable in script code.

    The error note is: "error missing ;"

    But if I look into the script, I wrote: publicVariable "SomeArrayName";
    I cant find any script code mistake.
    While initializing the mission all publicVariables "SomeName"; work fine. But later I get always the above mentioned error message if I use the command publicVariable later on.
    Strange.


    Thanks for any help in advance.
    Last edited by AAD10 Pete; Jul 9 2012 at 03:51.
    Greetings,

    Pete
    Clanleader
    http://aad10gameclan.enjin.com

  2.   Click here to go to the next Developer post in this thread.   #2

  3. #3
    I guess I found out the problem.
    Obviously it has nothing to do with the beta patches. I have this problem with the vanilla version 1.60 too.

    Each time if I have in a sqf file the code:

    SomeArrayName set [SomeArrayIndex, _SomeValue];

    and if I use later on in the same sqf file the code:

    publicVariable "SomeArrayName";

    I get the above mentioned error.

    If I use the publicVariable function in an another sqf file, all works fine again...

    ---------- Post added at 07:48 PM ---------- Previous post was at 07:46 PM ----------

    One of the file with the problem:
    ************************************************** ***
    //StartConnectionPlayerWithServer.sqf

    _ActPlayer = _this select 0;

    //Default
    _ActPlayerIndexTemp = 9999;

    //Read out DB communication string of this player
    _ActPlayerIndexTemp = [_ActPlayer]call fncReadOutPlayerIndexThisPlayer;

    if(_ActPlayerIndexTemp != 9999) then
    {
    //Say string to overall connect player with the database and exchange data if record already exists
    _AddNewStrToExecute = format["%1", (conDBcStrConnectPlayerWithDB + pubDBSeparateMainSign)];
    _ArrDBCommPlayerStringsTemp = format["%1",format["%1",pubArrDBCommPlayerStrings select (_ActPlayerIndexTemp-1)] + _AddNewStrToExecute];
    pubArrDBCommPlayerStrings set [(_ActPlayerIndexTemp-1), _ArrDBCommPlayerStringsTemp];

    //Hint player get startconnection with DB
    if(pubShowPersDBSystemHints == 1) then {hint "Player get startconnection with DB ";};
    publicVariable "pubArrDBCommPlayerStrings"; //<------------------------------------------------- Here occures the problem
    };


    //Terminate this script
    if(true)exitWith{};
    ************************************************** ***

    Second file with the problem:
    ************************************************** ***
    //HandleDBCommunicationStringOfEachPlayer.sqf

    _i = 1;
    _ii = 1;
    while {_i == 1 AND _ii <= pubMaxAnzHumanPlayers} do
    {
    _ActPlayerIndex = _ii;
    _ActDBCommPlayerString = format["%1",pubArrDBCommPlayerStrings select (_ii-1)];

    while {_ActDBCommPlayerString != ""} do
    {
    //Readout first string fragment of the DB communicatio string of this player
    _StrFragmentTemp = [_ActDBCommPlayerString, pubDBSeparateMainSign] call CBA_fnc_split;
    _AnzFragmThisArr = count _StrFragmentTemp;
    _StrFirstFragmentTemp = (_StrFragmentTemp select 0);

    //************************************************** *****************************
    //Process the first string fragment
    _d=[_StrFirstFragmentTemp, _ActPlayerIndex]execVM "database\functions\general\ProcessThisDBStrFragmO fPlayer.sqf";
    waitUntil {scriptDone _d};
    //************************************************** *****************************

    //Put fragment together with all rest arrays
    _StrRestFragmentTemp = "";
    for [{_iii=1}, {_iii<_AnzFragmThisArr}, {_iii=_iii+1}] do //Don't start with the index 0
    {
    _StrRestFragmentTemp = _StrRestFragmentTemp + format["%1",(_StrFragmentTemp select _iii)];
    };

    //Put the rest of the old DB communication string back to the array of this player
    _ActDBCommPlayerString = _StrRestFragmentTemp;
    };
    pubArrDBCommPlayerStrings set [(_ii-1), _ActDBCommPlayerString];

    _ii = _ii + 1;
    if(_ii >= pubMaxAnzHumanPlayersPosThisMis) then {_i = 0;};
    };
    publicVariable "pubArrDBCommPlayerStrings"; //<----------------------------------------------------- Here occures the problem

    //Terminate this script
    if(true)exitWith{};
    ************************************************** ***
    Last edited by AAD10 Pete; Jul 10 2012 at 04:29.

  4.   This is the last Developer post in this thread.   #4
    erm ... for example i see no pubShowPersDBSystemHints defined at all ...

    anyway i suggest use simple diag_log on the variable to output to RPT what You trying to pubVar before any conclusion can be met

  5. #5
    My fault. I wrote it the wrong way to this forum. It should be "pubArrDBCommPlayerStrings" not "pubShowPersDBSystemHints ". Now its written correctly in the above post.

    I will figure it out with "diag_log".

  6. #6
    please simplify the sample code, make a demo mission and post it in the CIT. thanks!

  7. #7
    After same hours more triggering around I am not sure anymore if the program with or without the beta patch is the problem. Or the CBA or the Arma2Net folder...
    Each time when I think I found the problem, its different again. Right now I am not able to reproduce the error directly with a small example mission.

    Meanwhile I guess that I have done a mistake somewhere in my new (huge) mission with a lot of scripts and code lines.
    The error "error missing ;" after using publicVariable could be only the logical following of an error caused before.

    Anyway, at the weekend I will split up my mission code into several modules and will try to encapsulate the error.

    Sorry for the possible "false alarm". I will keep you up to date as soon as I am sure why the publicVariable error occures during executing my mission file.

  8. #8
    Code:
    code tags FTW
    Documentation is not a dirty word.
    : TeamSPAFF : PRACS : RKSL : Stella Artois : Creme Eggs : GITS :

Similar Threads

  1. Beta Patches?
    By pchaxor in forum TAKE ON HELICOPTERS - GENERAL
    Replies: 6
    Last Post: Oct 29 2011, 19:31
  2. 1.06 beta patches.. when?
    By ^Th0mas^ in forum ARMA 2 & OA - BETA PATCH TESTING
    Replies: 75
    Last Post: Feb 1 2010, 21:23
  3. I have problem with beta patches.
    By FGM in forum ARMA 2 & OA - BETA PATCH TESTING
    Replies: 3
    Last Post: Dec 11 2009, 00:24
  4. Publicvariable problem
    By Patou in forum ARMA 2 & OA : ADDONS - Configs & Scripting
    Replies: 9
    Last Post: Jul 27 2009, 18:28
  5. 1.07 Beta Patches
    By cef71 in forum ARMA - TROUBLESHOOTING
    Replies: 3
    Last Post: May 29 2007, 12:28

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •