AAD10 Pete 10 Posted July 8, 2012 (edited) 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. Edited July 9, 2012 by AAD10 Pete Share this post Link to post Share on other sites
Dwarden 1125 Posted July 9, 2012 what about first provide exact code Yout try to use ? Share this post Link to post Share on other sites
AAD10 Pete 10 Posted July 9, 2012 (edited) 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\ProcessThisDBStrFragmOfPlayer.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{}; ***************************************************** Edited July 10, 2012 by AAD10 Pete Share this post Link to post Share on other sites
Dwarden 1125 Posted July 10, 2012 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 Share this post Link to post Share on other sites
AAD10 Pete 10 Posted July 10, 2012 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". Share this post Link to post Share on other sites
.kju 3244 Posted July 10, 2012 please simplify the sample code, make a demo mission and post it in the CIT. thanks! Share this post Link to post Share on other sites
AAD10 Pete 10 Posted July 11, 2012 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. Share this post Link to post Share on other sites