raymix Posted September 18, 2014 Author Report Share Posted September 18, 2014 Hey Raymix, I don't know if you would be willing to provide support for this or not, but I'm using Rim's newest P4L build (2.32) and I'm having trouble when it comes to snap_pro integration. When I use Rim's DZE_modularbuild: variable and set to true, I lose control of buildable objects and cannot abort the craft. I get an error in the RPT that states fnc_getpos has an error where the variable "_thingy" comes back as an array and its looking for an object. If I turn off DZE_modularbuild everything goes back to normal and the error is gone. Now from what I understand from Rim's instructions he has already merged everything necessary where you two use the same files for edits, and all I needed to do was properly path your dayz_spaceinterrupt and snappoints.hpp then enable that variable and I would be good to go, but it is not the case. I have included the error and the function in question for your perusal. If you tell me its Rim's fault and I need to cry at him thats ok too. Error in expression <0,0]}; _thingy = _this select 0; _pos = getPosASL _thingy; if !(surfaceIsWater _> Error position: <getPosASL _thingy; if !(surfaceIsWater _> Error getposasl: Type Array, expected Object File mpmissions\__CUR_MP.Napf\custom\A_Plot_for_Life\init\compiles.sqf, line 582 FNC_GetPos = { private "_pos"; if (isNil {_this select 0}) exitWith {[0,0,0]}; _thingy = _this select 0; _pos = getPosASL _thingy; if !(surfaceIsWater _pos) then { _pos = ASLToATL _pos; }; _pos }; Ahh, that's not a proper error I am looking for. Here's what happens - one of scripts is sending array to that function where it has to be an object. That function is not broken, it's just wrong arguments sent to it... let me explain. for example: //this will WORK! [player] call FNC_GetPos; //returns position of player, if no arguments are sent, returns [0,0,0] array. //these might NOT work _pos = position player; //variable is an array [_pos] call FNC_GetPos; //this COULD work, but most likely will give you same error... could work tho //this will definitely not work _objects = [_player,_vehicle,_plotPole,_someOtherObject]; //array of multiple objects [_objects] call FNC_GetPos; // will return error you got quick search on his github reveals sketcy variable... hmm, check out second result: https://github.com/RimBlock/Epoch/search?utf8=%E2%9C%93&q=FNC_GetPos lets open up that file and BOOM! it's not an object, but an array of multiple objects! _nearPlotPole = nearestObject [player, "Plastic_Pole_EP1_DZ"]; _BD_center = [_nearPlotPole] call FNC_getPos; FIX? replace it with: //nearestObject always adds first found object in very front of the array, so fix is as easy as _BD_center = [(_nearPlotPole select 0)] call FNC_getPos; Link to comment Share on other sites More sharing options...
poweredbypot Posted September 18, 2014 Report Share Posted September 18, 2014 Like a BAWS! Not only a fix but an explanation too! Thanks Raymix. For those of you who cant be bothered to read his explanation the fix in question is applied to Object_showplotradius.sqf inside MPMISSIONS\(map)\(your_custom_folder_name)\A_Plot_for_life\actions\ Link to comment Share on other sites More sharing options...
Mikeeeyy Posted September 18, 2014 Report Share Posted September 18, 2014 Ahh, that's not a proper error I am looking for. Here's what happens - one of scripts is sending array to that function where it has to be an object. That function is not broken, it's just wrong arguments sent to it... let me explain. for example: //this will WORK! [player] call FNC_GetPos; //returns position of player, if no arguments are sent, returns [0,0,0] array. //these might NOT work _pos = position player; //variable is an array [_pos] call FNC_GetPos; //this COULD work, but most likely will give you same error... could work tho //this will definitely not work _objects = [_player,_vehicle,_plotPole,_someOtherObject]; //array of multiple objects [_objects] call FNC_GetPos; // will return error you got quick search on his github reveals sketcy variable... hmm, check out second result: https://github.com/RimBlock/Epoch/search?utf8=%E2%9C%93&q=FNC_GetPos lets open up that file and BOOM! it's not an object, but an array of multiple objects! _nearPlotPole = nearestObject [player, "Plastic_Pole_EP1_DZ"]; _BD_center = [_nearPlotPole] call FNC_getPos; FIX? replace it with: //nearestObject always adds first found object in very front of the array, so fix is as easy as _BD_center = [(_nearPlotPole select 0)] call FNC_getPos; nearestObject only returns an object, not an array of them bud. Here: https://community.bistudio.com/wiki/nearestObject Link to comment Share on other sites More sharing options...
raymix Posted September 18, 2014 Author Report Share Posted September 18, 2014 nearestObject only returns an object, not an array of them bud. Here: https://community.bistudio.com/wiki/nearestObject well spotted, I had nearestObjects in mind. This means issue is still there, but I can't seem to find what's causing it by just searching trough github for modular or p4l files. @poweredbypot: any more error logs? What else addons are you using that causes incompatibility with P4L and SBP? Link to comment Share on other sites More sharing options...
poweredbypot Posted September 18, 2014 Report Share Posted September 18, 2014 actually its still the exact same error, and all I am using is the new P4l, SP 1.4.1 and Nox's admin tools for testing Link to comment Share on other sites More sharing options...
raymix Posted September 18, 2014 Author Report Share Posted September 18, 2014 actually its still the exact same error, and all I am using is the new P4l, SP 1.4.1 and Nox's admin tools for testing Just checked all files of modular P4L, everything looks in order. Just a heads up tho, Plot For Life v2.32 comes with SBP integrated (modular build), you dont need to install it separately. RimBlock is now using code from 1052 RC (106 now I guess) in prepartion for compatibility next major patch. Having this released as an addon gives him ability to have P4L tested on live servers before pushing it to 1.0.6. Installing SBP 1.4.1 with newest P4L could be the reason for these errors. Once you enable DZE_modularBuild a player_build.sqf file is no longer in use. Instead modular_build.sqf is used. Link to comment Share on other sites More sharing options...
poweredbypot Posted September 18, 2014 Report Share Posted September 18, 2014 I don't think its completely integrated though, we still have to add in your dayz_spaceinterrupt.sqf and your snappoints.hpp which I have done and properly referenced. The error only occurs when we enable his init.sqf config option that is supposed to enable the modular framework that includes the rest of your mod. Link to comment Share on other sites More sharing options...
raymix Posted September 18, 2014 Author Report Share Posted September 18, 2014 I don't think its completely integrated though, we still have to add in your dayz_spaceinterrupt.sqf and your snappoints.hpp which I have done and properly referenced. The error only occurs when we enable his init.sqf config option that is supposed to enable the modular framework that includes the rest of your mod. Well that's as far as it goes in terms of mission file. spaceinterrupt is used by quite a few mods out there and config file has to be added either way. SBP (modular build version) is called from here, so as I already mentioned, there is no need to add 1.4.1 on top of latest P4L :) please keep in mind that modular_build was brought to public quite early and as far as I am aware only P4L is compatible with it. Other addons will require special update as the file structure is quite different (code structure is the same tho, should be a breeze for anyone making scripts). Link to comment Share on other sites More sharing options...
poweredbypot Posted September 18, 2014 Report Share Posted September 18, 2014 Well now I'm confused, does that mean this is an issue Rim will have to look at then? I'm pretty sure we're saying the same thing different ways with the "installation" of SBP, I've moved space interrupt into mpmissions/map/custom and called although we know it makes no real difference there, and I have your snappoints referenced. Thats all that needs to be done according to Rim's installation guide and is all I have done as well. I just don't understand where the error is coming from I guess. Link to comment Share on other sites More sharing options...
raymix Posted September 18, 2014 Author Report Share Posted September 18, 2014 Well now I'm confused, does that mean this is an issue Rim will have to look at then? I'm pretty sure we're saying the same thing different ways with the "installation" of SBP, I've moved space interrupt into mpmissions/map/custom and called although we know it makes no real difference there, and I have your snappoints referenced. Thats all that needs to be done according to Rim's installation guide and is all I have done as well. I just don't understand where the error is coming from I guess. if that's the case, then you are right. The problem is a bit deeper than I expected, but can be traced back to it's origin. The way modular_build works is by simply passing and receiving arguments (in form of a single array) from main file - modular_build.sqf, if one of arguments received (object in this case) is wrong, the chain will break. So to find the cause we need to trace it back few functions. First and foremost - does all objects cause this or just particular object? Does plotpole work when trying to build it? You can reset broken build function by simply logging to lobby and reloading (since there's no debug console in A2)... Link to comment Share on other sites More sharing options...
poweredbypot Posted September 18, 2014 Report Share Posted September 18, 2014 Hmm, well I can't tell you for sure if its all objects or just the pole yet because I'm testing on a clean DB so let me switch to an old one with a pole already down and tell you for sure. Right now I can choose to build the pole and I get the object preview, but no text that tells me how to manipulate the object and no keystrokes cause any action to happen, I actually have to shutdown/relog to cancel the building preview. UPDATE: Couldn't get the other db to boot with the test build, so I disabled modular build and built a pole, brought it down, turned modular build back on and went to build but it tells me "needs a plot pole nearby". Checking the DB the plot pole does still have the PUID saved in the worldspace field. Hope this helps. Link to comment Share on other sites More sharing options...
HiiShinoo Posted September 19, 2014 Report Share Posted September 19, 2014 Hey, first of all i love this script, my biggest problem however right now is that i just discovered that you can remove other players walls, floors by scrolling on it and selecting remove! is there a fix for this? i would hate to remove this script any one have a fix for this issue? thanks Link to comment Share on other sites More sharing options...
RimBlock Posted September 19, 2014 Report Share Posted September 19, 2014 @ Moe: That is the normal functionality of Epoch. People have released mods to make items unremovable (which is pretty easy TBH) but Raymix has kept with the 'Sprit' the Epoch devs build Epoch on, i.e. people should be able to break in to others bases. @Poweredbypot: Is DZE_APlotforLife also set to true in the init.sqf ?. The file which decides if you can build on a plot with the modular base building turned on is player_build_plotCheck.sqf. Glancing at the file on the Git for my release I do not see any obvious issues. One other thing you could do is look at my fork of the Epoch 1.0.5.2-RC build as I have merged A Plot for Life in there and Raymix has his Snap Pro in there too. I used the relevent build files from there (merged in to the Epoch 1.0.5.1 pbos) to build a test server before putting in a pull request to Epoch. They should be a good baseline to compare with the ones in the standalone mod. I deliverately made subdirectories in the standalone mod with names matching those of the Epoch base code so people can quickly find where the corresponding files would be for comparison (yes... withe the exception of action which should be actions ;) ). Samve for the server files. Link to comment Share on other sites More sharing options...
HiiShinoo Posted September 19, 2014 Report Share Posted September 19, 2014 @ Moe: That is the normal functionality of Epoch. People have released mods to make items unremovable (which is pretty easy TBH) but Raymix has kept with the 'Sprit' the Epoch devs build Epoch on, i.e. people should be able to break in to others bases. @Poweredbypot: Is DZE_APlotforLife also set to true in the init.sqf ?. The file which decides if you can build on a plot with the modular base building turned on is player_build_plotCheck.sqf. Glancing at the file on the Git for my release I do not see any obvious issues. One other thing you could do is look at my fork of the Epoch 1.0.5.2-RC build as I have merged A Plot for Life in there and Raymix has his Snap Pro in there too. I used the relevent build files from there (merged in to the Epoch 1.0.5.1 pbos) to build a test server before putting in a pull request to Epoch. They should be a good baseline to compare with the ones in the standalone mod. I deliverately made subdirectories in the standalone mod with names matching those of the Epoch base code so people can quickly find where the corresponding files would be for comparison (yes... withe the exception of action which should be actions ;) ). Samve for the server files. I can assure you this isn't normal!! I had server prior to this with no modifications, when you build the owner can remove them upto i believe first server restart! i believe! by default you cant walk upto someone's base and remove their entire building with scrolling! the scrip would have had to have added this , would anyone else agree or disagree on this? Now if there is a fix for it can you please point me out to it? Link to comment Share on other sites More sharing options...
syco Posted September 19, 2014 Report Share Posted September 19, 2014 [FIXED] Toggle snap option does not show up for some reason. All I get is snap: OFF when I scroll and clicking it does nothing at all. The tutorial at bottom right shows up and F key works to drop/pick up object but no toggle snap option what so ever. Anyone have any ideal what the problem might be? EDIT1: I have disabled infistar and still same result so that's not the problem. EDIT2:My mistake. I placed everything inside a Scripts folder then custom folder and so on. Had to open snap_build.sqf and change the call lines with scripts\ in front..All fixed Hellstyrant 1 Link to comment Share on other sites More sharing options...
RimBlock Posted September 19, 2014 Report Share Posted September 19, 2014 I can assure you this isn't normal!! I had server prior to this with no modifications, when you build the owner can remove them upto i believe first server restart! i believe! by default you cant walk upto someone's base and remove their entire building with scrolling! the scrip would have had to have added this , would anyone else agree or disagree on this? Now if there is a fix for it can you please point me out to it? Checking the code, some items can and some cannot. Modular items cannot except the plot pole. Built items can be removed (they are part of the _isdestructable check). These include hedgehogs, sandbags, fences, gates. If floors can be removed then you will want to check the fn_selfactions.sqf (not part of this mod I believe) for any errors as that file controls what action items are displayed. Do you have any other mods installed as if there is not an error in the fn_selfactions.sqf then there is an issue with ownership and if you have installed my A Plot for Life or one or more of the other building scripts then there may be a problem with the fn_selfactions.sqf getting the correct ownership details. Link to comment Share on other sites More sharing options...
ATRealMaster Posted September 19, 2014 Report Share Posted September 19, 2014 Hello, I installed this script but when I try the snap, it doesnt snap to my old building, and when I try to build, the animation happens but the building disappears. Is this a bug? Link to comment Share on other sites More sharing options...
HiiShinoo Posted September 19, 2014 Report Share Posted September 19, 2014 Checking the code, some items can and some cannot. Modular items cannot except the plot pole. Built items can be removed (they are part of the _isdestructable check). These include hedgehogs, sandbags, fences, gates. If floors can be removed then you will want to check the fn_selfactions.sqf (not part of this mod I believe) for any errors as that file controls what action items are displayed. Do you have any other mods installed as if there is not an error in the fn_selfactions.sqf then there is an issue with ownership and if you have installed my A Plot for Life or one or more of the other building scripts then there may be a problem with the fn_selfactions.sqf getting the correct ownership details. everything can be removed, i do have other mods, i have: plot management group management snap pro Link to comment Share on other sites More sharing options...
raymix Posted September 19, 2014 Author Report Share Posted September 19, 2014 Hey, first of all i love this script, my biggest problem however right now is that i just discovered that you can remove other players walls, floors by scrolling on it and selecting remove! is there a fix for this? i would hate to remove this script any one have a fix for this issue? thanks Hi Moe, SBP has nothing to do with remove action, its some other mod causing this. SBP only integrates into the mod onto it's own thread (adds to), it does not remove functionality of any sort. Link to comment Share on other sites More sharing options...
raymix Posted September 19, 2014 Author Report Share Posted September 19, 2014 Hello, I installed this script but when I try the snap, it doesnt snap to my old building, and when I try to build, the animation happens but the building disappears. Is this a bug? what SBP version? What map? Seems to be buggy on NAPF for w/e reason, altho 1.4.1 should fix that. Link to comment Share on other sites More sharing options...
poweredbypot Posted September 19, 2014 Report Share Posted September 19, 2014 Yes the init option was true. I'm doing a comparison of the whole damn package, and exporting the diffs. I'll let you know what I find. Link to comment Share on other sites More sharing options...
HiiShinoo Posted September 19, 2014 Report Share Posted September 19, 2014 Hi Moe, SBP has nothing to do with remove action, its some other mod causing this. SBP only integrates into the mod onto it's own thread (adds to), it does not remove functionality of any sort. So would it be Plot management that is causing this or group management thats all i have, it just basically had my friend build once he was done i ran to his cinder and wood walls and was able to destroy all of his base with the option it gave me remove wall when you scroll, i was able to also remove metal panels and metal floor. where do i look for this ? how do i fix it? thanks Link to comment Share on other sites More sharing options...
ALKINDA Posted September 19, 2014 Report Share Posted September 19, 2014 Hello! using overpoch. OVERWATCH 0.25 and EPOCH 1.0.5.1 || also using infistar and admin fast build. Ive installed the snap builder and that worked fine. Now I am trying to install the newest version SNAP PRO 1.4.1 AFTER installed server runs, the object being built is see thru, so it should be working? -- since there is no errors in rpt log.... The bottom right hand corner doesnt show the menu, nore does f allow snapping. SNAPPING DOES NOT WORK ! -- no dots showing where to snap to. Why didnt you make the snap pro upgrade use the same file structure as the old version? Link to comment Share on other sites More sharing options...
poweredbypot Posted September 19, 2014 Report Share Posted September 19, 2014 So would it be Plot management that is causing this or group management thats all i have, it just basically had my friend build once he was done i ran to his cinder and wood walls and was able to destroy all of his base with the option it gave me remove wall when you scroll, i was able to also remove metal panels and metal floor. where do i look for this ? how do i fix it? thanks That sounds like a plot management problem, sorry I cant help more but I know i've heard that issue over there. Link to comment Share on other sites More sharing options...
poweredbypot Posted September 19, 2014 Report Share Posted September 19, 2014 Posted the results of my diff tests on P4l's thread. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now