hekut146 Posted October 5, 2015 Report Share Posted October 5, 2015 (edited) Please help, i add new function to server_updateObject.sqf, no saving info to db (update) Part script:PVDZE_veh_Update = [_object,"all2"]; publicVariableServer "PVDZE_veh_Update";server_updateObject.sqf (case):case "all2": { call _object_position2; };server_updateObject.sqf (function):_object_position2 = { private["_worldspace","_fuel","_key"]; _worldspace = _object call serializeExtendedObjectData; diag_log "_worldspace"; diag_log _worldspace; _fuel = 0; if (_object isKindOf "AllVehicles") then { _fuel = fuel _object; }; diag_log "_fuel"; diag_log _fuel; _key = format["CHILD:305:%1:%2:%3:",_objectID,_worldspace,_fuel]; diag_log "_key"; diag_log _key; //diag_log ("HIVE: WRITE: "+ str(_key)); _key call server_hiveWrite; diag_log "_key"; diag_log _key; };Info generate normal, no save to db, no error in logs (client/server/hive)... Edited October 5, 2015 by hekut146 Link to comment Share on other sites More sharing options...
0 hekut146 Posted October 5, 2015 Author Report Share Posted October 5, 2015 (edited) Where my problem\error? Edited October 5, 2015 by hekut146 Link to comment Share on other sites More sharing options...
0 kelso000 Posted October 5, 2015 Report Share Posted October 5, 2015 What exactly are you trying to do? hekut146 1 Link to comment Share on other sites More sharing options...
0 hekut146 Posted October 5, 2015 Author Report Share Posted October 5, 2015 Save new _worldspace to db (update old) Link to comment Share on other sites More sharing options...
0 hekut146 Posted October 5, 2015 Author Report Share Posted October 5, 2015 i write new info to _worldspace (dir,position,uid,my_info) Link to comment Share on other sites More sharing options...
0 blue Posted October 5, 2015 Report Share Posted October 5, 2015 You define object_position2 as a function but you are calling _object_position2 which does not exist. Also object_position2 is never passed the variable containng the _object. You, also, cannot pass a non-string value or variable to diag_log (diag_log _fuel), if it is a non-string value or variable it must first be transformed into a string.Also, what is serializeExtendedObjectData? hekut146 1 Link to comment Share on other sites More sharing options...
0 hekut146 Posted October 5, 2015 Author Report Share Posted October 5, 2015 (edited) serializeExtendedObjectData generate _worldspace Edited October 5, 2015 by hekut146 Link to comment Share on other sites More sharing options...
0 hekut146 Posted October 5, 2015 Author Report Share Posted October 5, 2015 (edited) my script call case "all2": { call _object_position2;};and this case call functionobject_position2 = {i write object_position2 (function) in script server_updateObject.sqf (in first message in this trade) Edited October 5, 2015 by hekut146 Link to comment Share on other sites More sharing options...
0 hekut146 Posted October 5, 2015 Author Report Share Posted October 5, 2015 (edited) private["_vehicleLock","_skinFiles","_animationStates","_position","_worldspace","_fuel","_key","_vectorFix","_dirFix","_lockFix"]; _object = _this; _position = _object getVariable ["extendedPos",getPosATL _object]; _ownerPUID = _object getVariable ["ownerPUID",""]; _skinFiles = _object getVariable ["skinFiles",[]]; _animationStates = _object getVariable ["animationStates",[]]; _buildStage = _object getVariable ["buildStage", 0]; _attachedObjects = []; _dirFix = getDir _object; _vectorFix = [1,0,[],[],[]]; _lockFix = 1; _worldspace = [ _dirFix, _position, _vectorFix, _ownerPUID, [ _lockFix, _buildStage, _skinFiles, _animationStates, _attachedObjects ] ]; _worldspacethis serializeExtendedObjectData Edited October 5, 2015 by hekut146 Link to comment Share on other sites More sharing options...
0 hekut146 Posted October 5, 2015 Author Report Share Posted October 5, 2015 (edited) Sorry in head trade i don't copy _ in object_position2 in my file _object_position2, now i edit 1-st post, error no hire(... Edited October 5, 2015 by hekut146 Link to comment Share on other sites More sharing options...
0 hekut146 Posted October 5, 2015 Author Report Share Posted October 5, 2015 (edited) i add diag_log to see who in my _key _fuel _worldspace all normal but no rewrited/saving to db Edited October 5, 2015 by hekut146 Link to comment Share on other sites More sharing options...
0 hekut146 Posted October 5, 2015 Author Report Share Posted October 5, 2015 (edited) i found problem (i think), but don't know how to fix, when building my object don't have _objectID (_objectID = 0), and function don't know where update information Edited October 6, 2015 by hekut146 Link to comment Share on other sites More sharing options...
0 hekut146 Posted October 6, 2015 Author Report Share Posted October 6, 2015 no problem to _objectID in db have but no load 6:07:15 "_objectID: 0"and key 6:07:15 "_key: CHILD:305:0:[19.7298,"[6554.269531,7262.731445,0.53299]",[1,0,[],[],[]],"76561198049704275",[1,2,[],[],[]]]:0:" Link to comment Share on other sites More sharing options...
0 hekut146 Posted October 6, 2015 Author Report Share Posted October 6, 2015 Please help how to load _ObjectID in object? Link to comment Share on other sites More sharing options...
0 hekut146 Posted October 6, 2015 Author Report Share Posted October 6, 2015 (edited) _ObjectID = _object getVariable['ObjectID','0'];no work when i add in function Edited October 6, 2015 by hekut146 Link to comment Share on other sites More sharing options...
Question
hekut146
Please help, i add new function to server_updateObject.sqf, no saving info to db (update)
Part script:
server_updateObject.sqf (case):
server_updateObject.sqf (function):
Info generate normal, no save to db, no error in logs (client/server/hive)...
Edited by hekut146Link to comment
Share on other sites
14 answers to this question
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now