Jump to content

SicSemperTyrannis

Member
  • Content Count

    64
  • Joined

  • Last visited

  • Medals

Posts posted by SicSemperTyrannis


  1. I'm still not entirely understanding your need for it, if it's to store inventory only, the server has that information and you don't really need to specifically send your loadout from the client to the server.

    The server has that data explicitly, meaning, it'd be there whether you specifically sent it or not.

    That being the case, I could look into making a gzip extension, but it might not work well with the ini format.


  2. Is is possible for implementing the string compression?

    Since I, myself, am not a native programmer, then it is quite hard for me to understand some codes.

    Can you give me some advice for implementing the string-data compression (zlib, glib, lzw) to your codes?

    Why would you need string compression if you don't mind my asking?

    I can try to make a separate extension to meet your needs if I know what it is for.

    EDIT:

    @Bad Benson: No, it doesn't belong in the client init. If the server isn't running the code, it will not work. You have to execute the code on the server-side and I explain how to do that in this topic in detail.


  3. First, this is a great system, works very well, but I have 1 problem and hopefully someone can help me out with it.

    This makes no sense to me as to why this doesn't work, and is regarding weapons & magazines loading, everything else loads perfectly fine and has no issue.

    First My Save variable

    _Profile		= format["%1", getPlayerUID player];
    [_Profile, "playerData", "Weapons", weapons player] call iniDB_write;
    [_Profile, "playerData", "Ammo", magazines player] call iniDB_write;
    

    Then my loading info which executes in the same file, same time, as all the other variables which load perfectly fine.

    _Weps		= [_Profile, "playerdata", "Weapons", "ARRAY"] call iniDB_read;
    _Mags		= [_Profile, "playerdata", "Ammo", "ARRAY"] call iniDB_read;
    

    And currently I have it as

    player addWeapon _Weps;
    

    I've tried (_Weps); , this addWeapon _Weps; , (_Weps); , I've literally tried everything I know, and it just will not give the weapons or mags, if anyone has gotten it to load the mags and weapons without issues... please share :(

    Couple of things... first, you can't call iniDB_read on the client. Once again guys, the server. The server. The server.

    Also as far as I'm aware, addWeapon does not accept arrays. Try using the script I mentioned early on to get/set loadout.

    Not sure if it will help or not, depends what type of mission you have in my opinion. I run a Takistan Life, Island Life, and Wasteland, and they all save perfectly fine with just setting the options and things to save and executing the script in the init.sqf that executes per player, on a loop while the player is connected.

    Um, question. How would "player" be a valid variable on the server... ? I feel like a lot of you guys should read up on code locality in ARMA.

    I'm not trying to make fun of any of you guys it's just... that has to be broken. If you're running it on a test server, it might save YOUR stats since isServer == true and player is valid on a local, non-dedicated server.

    If you try running it with actual players i have a strong feeling it will break.

    Protip: If iniDB_read/iniDB_write and "player" are used nearby one another, it's likely going to be broken.


  4. You're coding that completely incorrectly.

    if(!isServer) exitWith {};
    _unit = _this;
    _profile = format["%1", getPlayerUID _unit];
    _position = [_profile, "playerdata", "position", "ARRAY"] call iniDB_read;
    _score = [_profile, "playerdata", "score", "NUMBER"] call iniDB_read;
    _unit setPos _position;
    _unit setScore _score;
    

    Then in the init:

    0=this execVM "playerinit.sqf";

    What you're doing extremely wrong is you did not read up on the scripting language.

    I know it's inconsistent, hard to understand and well... no apologies for the language itself, but you should learn the fundamentals before tackling something like this.


  5. works like a champ.

    I get this when trying to move an object:

    _posX = (GUI_idcActive_pos select 0) + _diffMouseX;
    _posY = (GUI_id>
     Error position: <select 0) + _diffMouseX;
    _posY = (GUI_id>
     Error Generic error in expression
    File A3\functions_f\gui\editor\GUI_fnc_ctrlMouseMoving.sqf, line 162
    Error in expression <ys) then {

    EDIT: Also, Escape and F1 thing doesn't work for me at all.


  6. That seems about right, DukeRevenger. You also shouldn't forget to set triggerSave to false on the server after you've written the data, or if it's in a loop it'll just save continuously.

    ---------- Post added at 22:39 ---------- Previous post was at 22:37 ----------

    God.. i cant figure out how to get this running non-local, What does the init file need to make clients auto save and then that it just loads the array on spawn

    It isn't designed to make "clients auto save", if you want to save data to the client there is functions like http://community.bistudio.com/wiki/saveVar which I believe allow you to save to the local computer.

    iniDB should be used for things that require saving on the server-side specifically.

    EDIT: However, I will probably make an example mission soon for a simple gear save since so many people have asked for one.

×