Jump to content

xjoker_

Member
  • Content Count

    208
  • Joined

  • Last visited

  • Medals

Posts posted by xjoker_


  1. 11 hours ago, pierremgi said:

    Did you set your variable as public ( building setVariable ["aVariable",someData,TRUE] )?

    yes of course

    11 hours ago, pierremgi said:

    Have you the same version of the map?

    how can i know if a player have a different version of the map ? 

    i have verifySignatures = 2; in the server config 

     

    edit : i was wrong. The netId is the same on every player. But for some reason at a random moment some players (~5/100) don't have any variable on the house. 
    Just like if they e'xecuted locally something like

    {_house setVariable [_x, nil]} foreach allVariables _house; 

     

    edit2 : i created a ticket on the feedback tracker : https://feedback.bistudio.com/T170985


  2. Hello. 

     

    According to the wiki, the command netID is used to get a unique ID of an object, and it's supposed to be the same for every players. 

    But sometimes, (randomly ?), some players have different netID when looking at buildings placed on the map.

    That means they don't see the same object as everyone else, which means if you have set some variables on the building with the setVariable command, those players can't see these variables and their values. 

     

    The question is, is there anything that these players can do to be syncronized with everyone ? (Disconnecting / reconnecting doesn't solve the problem).

     

     


  3. Hello, 

     

    I was wondering if there is a "clean" way to make some kind of OnChange listener on a RscEdit control. 

    So in my dialog, when i'm typing some text in this control, it would automatically update other controls within the same dialog ? 

     

    I could make a loop which check the current value each X ms but that doesn't seem very optimal. 

    Thanks 


  4. Quote

    Changed: createVehicleLocal was restricted in multiplayer - enterable vehicles, shots, explosions and similar are no longer possible to spawn (the old behavior can be turned on via "unsafeCVL=1" in the description.ext or server's config)

     

    What's the difference between adding unsafeCVL= 0 or adding createVehicleLocal in CfgDisabledCommands ?


  5. Bigger problem : dbResultToParsedArray and dbResultToArray

    _query = dbPrepareQuery ["SELECT steamid, position FROM players WHERE playerid = ?", [279]];
    _result = DB_connection dbExecute _query;

    steamid is a varchar(17)

    position is a varchar(45)

     

    diag_log str ["RESULT",dbResultToArray _result];

    will print 

    19:08:18 "[""RESULT"",[[""7656119807XXXXXXX"",""[8280.25,9981.17,0.00143433]""]]]" // pos is not parsed so i can't use directly the setPos command

    And

    diag_log str ["RESULT PARSED",dbResultToParsedArray _result];

    will print

    19:08:18 "[""RESULT PARSED"",[[7.65612e+016,[8280.25,9981.17,0.00143433]]]]" // i can use setPos, but steamid has been parsed too and i need it as a string (to use with getPlayerUID)

    So we need a way to choose fields that we want to parse 

    for example in extDB3 : OUTPUT = 1-STRING, 2-STRING, 3, 4


  6. I don't know what's the best solution.

    But for my personnal usecase, I know that I have many checks like that 

    if !(_groupId isEqualTo "") then {
      _obj setVariable ["groupId",_groupId,true];
    };

    to do something for example when a foreign key is not null for certain rows

    so i'll have to rewrite few files (not a big deal btw but just saying) to replace that with a

    if(!isNil "_var") then

     


  7. Hello.

     

    Let's say in my mission, at any time, clients need to get the number of players that have a specific variable assigned.

    What method is the best (mostly for network traffic) between 

    • when players connect, the server assign a random var (A, B, or C) to them using 
      _unit setVariable ["var","A",true]; // A, B or C

      And clients can get the number of players like that

      _nbA = {_x getVariable ["var",""] isEqualTo "A"} count playableUnits;

       

    • or when players connect, the server increments a variable (and do the opposite when players disconnect) like 
      nbA = nbA + 1;
      publicVariable "nbA";
      
      nbA = nbA - 1;
      publicVariable "nbA";

      And clients can access the var like that 

      hint str nbA;
      hint str nbB;
      hint str nbC;

       

     


  8. Hello, 

     

    Let's say I have a database , with like 5k players, 10k vehicles, 5xx groups... 

    And i have to update those very often

    Is it better to update directly in DB whenever it's needed (for example using extDB3), 

    or to have server variables with a huge number of entries (arrays),

    and when i want to update something i browse all these arrays, to find some players/objects IDs, update data in those variables, and then update the DB like every X minutes/hours with my variables ?

    like some sort of "caching system"

    Is there a limit for what you can store in a variable ?

×