• 0
s3v3red

Variable cant be retrieved? ExileOwnerUID

Question

Posted (edited)

So, ExileServer_object_vehicle_database_load is supposed to set the varriable 'ExileOwnerUID'.

The problem is, I cant seem to retrieve it. Ive tried many different syntax's to no avail. Ive looked at many examples and cant see the problem.

Im hoping you can help.

 

_uid = getPlayerUID player;

_serverLockSetting = (getNumber (configFile >> "CfgSettings" >> "VehicleSpawn" >> "unlockInSafeZonesAfterRestart")) isEqualTo 1;

_vehicle = getPos player nearestObject "Car","Truck","Air","Support","Armored"; // can add "Ship" & "Submarine"

_vehDisplayName = gettext (configFile >> "CfgVehicles" >> (typeof _vehicle) >> "displayName");

_position = position _vehicle;

_vehicleOwner = _vehicle getVariable ["ExileOwnerUID","SomethingWentWrong"]; //get vehicle owner ID

Always, and i mean ALWAYS, returns "somethingwentwrong".

Edited by s3v3red

Share this post


Link to post
Share on other sites

4 answers to this question

  • 0

even if i try it this way

_vehicle = _this;
_data = format["loadVehicle:%1", _vehicle] call ExileServer_system_database_query_selectSingle;

it tells me ExileServer_system_database_query_selectSingle is an undefined variable?@?!?

Share this post


Link to post
Share on other sites
  • 0
_vehicle = getPos player nearestObject "Car","Truck","Air","Support","Armored"; // can add "Ship" & "Submarine"

This is setting _vehicle to some coordinates value. It's not setting it to a vehicle object, therefore when you try to get a vehicle object variable, it's failing.

ExileServer_system_database_query_selectSingle will be undefined if you are calling from a client-side command, it needs to come from a server-side call.

Share this post


Link to post
Share on other sites
Advertisement
  • 0

ExileClient_gui_wasteDumpDialog_show.sqf is a good example of how to retrieve nearby vehicle objects, even accounting for multiple possible objects.

Share this post


Link to post
Share on other sites
  • 0

Thanks, ive actually went an entirely different route because of my issues and used the client side network send to send the information to the server side and do what im trying to accomplish. I can understand why they dont want these variables accessible client side, but we should have the option to do so.

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.