Welcome to Altis Life RPG

Register now to gain access to all of our features.
Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.


Note that you can now sign-in with your Steam account.


This message will be removed once you have signed in.


  • Announcements

    • AltisLifeRpg

      Opening Announcement   09/13/2016

      Opening Announcement We are happy to announce the official reopening of the community assistance forum Altis Life RPG (open source public property). Before going any further, let's go over the current situation. As you are already aware, the forum and the database of Altisliferpg.com had been hacked a few weeks ago. This unfortunate situation has touched many communities of Arma 3. The various databases were erased, and since they were under the responsibility of the previous administration, no backup was able to recover the lost data. This means that all the tedious work must be redone. This regrettable situation has led Tonic to transfer the responsibility of its administration to a new and neutral party. This party has as sole goal to reunite every community, as diverse as they are, together to perpetuate the development of our beloved mod AltisLifeRPG.  First of all, I think it is important to clarify our intentions. Foremost, we want to reassure you that we are not proclaiming being the owners of the previous versions of Altis Life (open source public property) in collaboration with BoGuu based on Tonic' codes. As you know, Boguu has been a major player in the most recent versions. Please note that this platform is and will always remain open to future developers such as Boguu that would like to elevate Altis Life RPG to the next level. By doing so, we take our role as an official reference platform very seriously in the eyes of the vast community of Altis Life RPG. We are ready to face this responsibility. We are aware that the content added by users could be provided by external sources or from the original website. If you see a tutorial that you've created on our platform where you are not credited as the author, please mention it immediately to the administration and we will promptly fix the situation. Please note that seeing the overwhelming amount of content added by the community, we will not proactively search other community assistance websites to validate if proper credits were given to the various authors. Instead, it will be the author's responsibility to be proactive in contacting the administration. Since the majority of the content found on other websites came originally from Altisliferpg.com, we encourage members joining us to share any content deemed pertinent coming from other platforms without forgetting to credit the authors.       Finally, to clarify the rumors circulating: - The forum was not scammed. It was transferred directly from Bryan 'Tonic' Boardwine to our administration. A domain cannot be scammed. - The forum was transferred as an independent entity which has as a sole mission to perpetuate the forum and not let it die out.       Altisliferpg.com Regards, the Administration.       Feel free to join us on Discord in the Altis Life RPG Community section of the forum.   And of course if you have any question, feel free to message us here.
    • Rozo

      Donations   09/18/2016

      Hello,
        We've added a donation block on the right side. All of those donation goes directly to the developer of Altis Life mod ( currently BoGuu ). None of that money is used to maintain the forum. In the future we might add a donation button to support the forum, but for now we want to encourage the developer because they went through a lot. To discuss this topic - Here
    • Shakir Darwish

      IS YOUR SERVER BROKEN SINCE 1.64 UPDATE?   09/22/2016

      If your server is broken since 1.64 go check this link thanks. https://github.com/AsYetUntitled/Framework/issues/104
    • Rozo

      Sad Day   01/04/2017

      Good evening community of Altis Life RPG, Today was a sad day. We learned the hard way that one of the helper was using his status and visibility on the forum to do things i wouldn't imagine.  We were warned about this user in the beginning, we talked about his behavior and he said that they were things of the past. We were fooled.
      Unfortunately, he fooled other community members by selling stolen content and impersonating his role as a developer in another community. Here's a remember of one of the rules on our forum, No selling scripts, snippets, or services.   So if anyone come across someone who's selling his services, scripts or whatever, Report them. Especially if it's coming from an Helper, Mod, Admin. No one in the staff should ask for money, we already mention this when we reopened the forum and that rule is here to stay.

      We can't be sorry enough for what happen here, for any harm it as caused among other communities, for money that shouldn't been spent and we truly hope this doesn't happen again.

      As for the user in question, he is now banned from our forum and discord and we wish to never cross his path again.
        If there's anything we can do hit us on Discord or send a message to an admin.
      Thanks, Rozo.
Sign in to follow this  
Followers 0
SEM

fn_requestReceived.sqf

Hello

 

Could someone please help me understand what this part of code is doing as I modified my db and files to add few more fields. Everything seems to be working but it's tripping on this part. If I comment that bit it works perfectly fine. I would like to know what this is doing so I could adjust it accordingly with my changes.

 

Altis_Life.Altis\core\session\fn_requestReceived.sqf

if (count (_this select (_count - 1)) > 0) then {
    {life_vehicles pushBack _x;} forEach (_this select (_count - 1));
};

 

Thanks

Share this post


Link to post
Share on other sites

It's checking if you have more than one vehicle (the last thing on the array) and if so it adds them all to your life_vehicles (keychain)

1 person likes this

Share this post


Link to post
Share on other sites

Posted (edited)

Thank you that's what I thought. If you don't mind I have one more question.

(_this select (_count - 1))

Seems to be pointing originally on playtime. In my case its 10 for each side now as I added few fields to my users and modified queries but if I change it to 10 it get stuck. Otherwise it works only for medics. For civ or cops it get stuck on it. Do you have any tips on why is this happening?

Edited by SEM

Share this post


Link to post
Share on other sites

You've evidently changed the order of the pushbacks in fn_queryRequest (in lifeserver/functions/mysql).

Remember that in ARMA arrays start at 0, so if the query result array contains 10 values, the last one is "_queryResult select 9" and the first is "_queryResult select 0"

1 person likes this

Share this post


Link to post
Share on other sites

I've checked it again but it seems like those are on value 10. That's why I'm getting confused. Also I cannot quite understand why forEach that is suppose to fill active vehicles is referring to playtime. Are those two connected in any way? I feel like I'm missing something obvious which is escaping my sight.

life_server\Functions\MySQL\fn_queryRequest.sqf

SELECT plid, name, cash, bankacc, adminlevel, donorlevel, cop_licenses, coplevel, cop_gear, cop_stats, playtime
SELECT plid, name, cash, bankacc, adminlevel, donorlevel, civ_licenses, arrested, civ_gear, civ_stats, playtime
SELECT plid, name, cash, bankacc, adminlevel, donorlevel, med_licenses, mediclevel, med_gear, med_stats, playtime

Thank you

Share this post


Link to post
Share on other sites

No, more stuff is pushed back onto query result as you move down queryRequest.sqf, it does not refer to playtime...

Please read the script.

1 person likes this

Share this post


Link to post
Share on other sites

Posted (edited)

Yes but I changed it to and it's still doesn't work:

if (count (_this select 10) > 0) then {
    {life_vehicles pushBack _x;} forEach (_this select 10);
};

Shouldn't that be enough?

Edited by SEM

Share this post


Link to post
Share on other sites
9 minutes ago, J4Wx said:

No, more stuff is pushed back onto query result as you move down queryRequest.sqf, it does not refer to playtime...

Please read the script.

 

1 person likes this

Share this post


Link to post
Share on other sites

Ok. I've moved playtime to the end of the query and adjusted the rest to reflect that. I left this code in original form with (_count - 1) and it's still not working. For me it do not looks like it's fault of this changes to the query as moving playtime to last position or setting select to the position where it is does nothing.

Are there any other files that could be affected by my changes to fn_queryRequest.sqf ?

I still feel like I am missing something. If I didn't understood you could you please elaborate it in more details so it could get into my thick head? :)

 

Thank you

Share this post


Link to post
Share on other sites

Why are you still talking about playtime?

1 person likes this

Share this post


Link to post
Share on other sites
1 hour ago, J4Wx said:

No, more stuff is pushed back onto query result as you move down queryRequest.sqf, it does not refer to playtime...

Please read the script.

 

1 person likes this

Share this post


Link to post
Share on other sites

Thank you :D

Finally I've understood it. It took me a while... I got so stuck to this playtime even it didn't made a lot sens when I was looking at this code that I couldn't think straight. Thank you so much for hammering it out of my brain.

fn_queryRequest.sqf

_keyArr = missionNamespace getVariable [format["%1_KEYS_%2",_uid,_side],[]];
_queryResult set[15,_keyArr];

Because only medic had below 15 it worked only for him. I changed that to 20 and it works now and make sense. :D

Thank you so much again it would take me probably much longer to realise how silly I was.

Share this post


Link to post
Share on other sites
28 minutes ago, SEM said:

Thank you :D

Finally I've understood it. It took me a while... I got so stuck to this playtime even it didn't made a lot sens when I was looking at this code that I couldn't think straight. Thank you so much for hammering it out of my brain.

fn_queryRequest.sqf


_keyArr = missionNamespace getVariable [format["%1_KEYS_%2",_uid,_side],[]];
_queryResult set[15,_keyArr];

Because only medic had below 15 it worked only for him. I changed that to 20 and it works now and make sense. :D

Thank you so much again it would take me probably much longer to realise how silly I was.

I'm glad I could get you to finger it out for yourself, you're welcome!

Share this post


Link to post
Share on other sites

This issue had been resolved or closed. Moving to the solved section.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0