Jump to content
Sign in to follow this  
speedshooter

Error Zero Divisor !!HELP!!

Recommended Posts

Im getting a Error Zero Divisor in my .RPT file. I cannot figure out why. If you need anymore info let me know

RPT FILE:

Error in expression <en {
_ret = (((UltRP_AllMissionObjects) select _itemid) select 1) select 8;
};
_>
 Error position: <select _itemid) select 1) select 8;
};
_>
 Error Zero divisor
File C:\Users\Admin\Documents\ArmA 2 Other Profiles\HunterJ\mpmissions\UltRP_Alpha_1.Chernarus\UltRP\Global\FNC_Items.sqf, line 208

FNC_Items.sqf [Line 208]:

UltRP_Cfg_Items_GetString = {
   private ["_ret","_itemid"];
   _ret = "";
   _itemid = _this select 0;
   if (typeName(_itemid) == "SCALAR") then {
       _ret = (((UltRP_AllMissionObjects) select _itemid) select 1) select 8;
   };
   _ret;
};

Here is how it creates the array [ultRP_AllMissionObjects]

UltRP_AllMissionObjects = UltRP_AllWeaponObjects + UltRP_AllMagazineObjects + UltRP_AllVehiclesObjects + UltRP_AllItemsArray + UltRP_AllUnitsArray;

This is an example of whats in one of the arrays:

[437, [2, TRUE, 20000, "2000", ["lic_car"], [[1,15]], [], "LAMBORGHINI_MURCIELAGO", "Lamborghini Murcielago", ""]],

Edited by speedshooter

Share this post


Link to post
Share on other sites

Looks like you are trying to access a double nested array (if thats the correct terminology?) and it isn't at the correct location.

If you want "Lamborghini Murcielago" out of that array its:

_ret = (UltRP_AllMissionObjects select 1) select 8;

"lic_car" would be:

_ret = (UltRP_AllMissionObjects select 1) select 4 select 0;

1 would be:

_ret = (UltRP_AllMissionObjects select 1) select 5 select 0 select 0;

Share this post


Link to post
Share on other sites

Please do not remove branding, I have provided my mission for public use under the condition the attributions are maintained. Thank you.

Share this post


Link to post
Share on other sites
Please do not remove branding, I have provided my mission for public use under the condition the attributions are maintained. Thank you.

Did you post in the wrong thread perhaps?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×