Jump to content
z80cpu

'Code 13' And CUP

Recommended Posts

Hello!

 

I have an issue which I can find no viable solution for.  All links from Google go to 'ExileMod.Com', which we know no longed exist.

 

My issue is ALL vanilla vehicles can be bought and spawned in with no issue(s).  Try to purchase a CUP vehicle?  You get the 'Code 13' error message.  Everything was working just fine till the last updates.  Nothing has been changed in many months (server/client files), so it SHOULD not be an issue with the mission files.

 

I saw somewhere this code means 'not enough space' (online), which in other cases it might be true, but not when you spawn on an airfield...MORE than enough room!  😉   Also, one of the vanilla vehicles was BIGGER than the CUP vehicle which I tried, so 'space/room' is NOT the issue here.

 

I did search on:  Google, ExileMod.Net, The 'Way Back Machine', and here.  Zero results.  😞  And case anyone can find it online, I used:  exile "code 13" cup -exilemod.com arma

 

 

Any help would be greatly appreciated!

 

Thanks!

 

🙂

 

Share this post


Link to post
Share on other sites

Any custom vehicle spawner / helipad / ammo fuel repair station scripts?  Can you post your ExileServer_system_trading_network_purchaseVehicleRequest or the override if you have any?
Never had any troubles with CUP Vehicles, I can spawn them just fine. Can you spawn them in via infistar?

  • Thanks 1

Share this post


Link to post
Share on other sites

Hello Chernaruski,

 

Thank you for your assistance.

 

I do have a gas station script, but I have never had an issue with anything till the last CUP update.  And no, I can not spawn CUP vehicles from IS.

 

My 'setup' has been working (minus Exile/ARMA updates) for almost 3 years now - no issues...till now...

 

And if you're referring to overwrites on that function, I have none.  Just the 'waste dump' and 'sell crates' and both of those have been in use since 2016!  😉

 

And the file you mention is the original one that comes with the latest version of Exile.

 

/**
 * ExileServer_system_trading_network_purchaseVehicleRequest
 *
 * Exile Mod
 * www.exilemod.com
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. 
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
 */
 
private["_sessionID", "_parameters", "_vehicleClass", "_pinCode", "_playerObject", "_salesPrice", "_playerMoney", "_position", "_vehicleObject", "_logging", "_traderLog", "_responseCode"];
_sessionID = _this select 0;
_parameters = _this select 1;
_vehicleClass = _parameters select 0;
_pinCode = _parameters select 1;
try 
{
	_playerObject = _sessionID call ExileServer_system_session_getPlayerObject;
	if (isNull _playerObject) then
	{
		throw 1;
	};
	if !(alive _playerObject) then
	{
		throw 2;
	};
	if (_playerObject getVariable ["ExileMutex",false]) then
	{
		throw 12;
	};
	_playerObject setVariable ["ExileMutex", true];
	if !(isClass (missionConfigFile >> "CfgExileArsenal" >> _vehicleClass) ) then
	{
		throw 3;
	};
	_salesPrice = getNumber (missionConfigFile >> "CfgExileArsenal" >> _vehicleClass >> "price");
	if (_salesPrice <= 0) then
	{
		throw 4;
	};
	_playerMoney = _playerObject getVariable ["ExileMoney", 0];
	if (_playerMoney < _salesPrice) then
	{
		throw 5;
	};
	if !((count _pinCode) isEqualTo 4) then
	{
		throw 11;
	};
	if (_vehicleClass isKindOf "Ship") then 
	{
		_position = [(getPosATL _playerObject), 100, 20] call ExileClient_util_world_findWaterPosition;
		_vehicleObject = [_vehicleClass, _position, (random 360), false, _pinCode] call ExileServer_object_vehicle_createPersistentVehicle;
	}
	else 
	{
		_position = (getPos _playerObject) findEmptyPosition [10, 250, _vehicleClass];
		if (_position isEqualTo []) then 
		{
			throw 13;
		};
		_vehicleObject = [_vehicleClass, _position, (random 360), true, _pinCode] call ExileServer_object_vehicle_createPersistentVehicle;
	};	
	_vehicleObject setVariable ["ExileOwnerUID", (getPlayerUID _playerObject)];
	_vehicleObject setVariable ["ExileIsLocked",0];
	_vehicleObject lock 0;
	_vehicleObject call ExileServer_object_vehicle_database_insert;
	_vehicleObject call ExileServer_object_vehicle_database_update;
	_playerMoney = _playerMoney - _salesPrice;
	_playerObject setVariable ["ExileMoney", _playerMoney, true];
	format["setPlayerMoney:%1:%2", _playerMoney, _playerObject getVariable ["ExileDatabaseID", 0]] call ExileServer_system_database_query_fireAndForget;
	[_sessionID, "purchaseVehicleResponse", [0, netId _vehicleObject, _salesPrice]] call ExileServer_system_network_send_to;
	_logging = getNumber(configFile >> "CfgSettings" >> "Logging" >> "traderLogging");
	if (_logging isEqualTo 1) then
	{
		_traderLog = format ["PLAYER: ( %1 ) %2 PURCHASED VEHICLE %3 FOR %4 POPTABS | PLAYER TOTAL MONEY: %5",getPlayerUID _playerObject,_playerObject,_vehicleClass,_salesPrice,_playerMoney];
		"extDB2" callExtension format["1:TRADING:%1",_traderLog];
	};
}
catch 
{
	_responseCode = _exception;
	[_sessionID, "purchaseVehicleResponse", [_responseCode, "", 0]] call ExileServer_system_network_send_to;
};
if !(isNull _playerObject) then 
{
	_playerObject setVariable ["ExileMutex", false];
};
true

So this is something that has changed in the CUP.  6 months ago?  Zero issues and the server has not been touched EXCEPT for ARMA updates and the CUP/CBA updates.  And yes, CBA is 'on' in the config file.

 

It is as if it is reading the config file 'wrong'.  For example:

 

Old CUP:  a, b, c, d

 

New CUP:  b, c, d, a

 

That is about all I can make out of it.  And looking at the above code, it would 'throw' an error 13 if not enough room, thus why I think the config for CUP may be 'off' now, as it used to work with no issues.  ???  Thanks for pointing (sorta) what threw this code...always wondered...but not enough to look...  😉

 

And standing in an empty field IS will not spawn a thing...CUP 'thing' that is...  😉

 

 

I do appreciate your help in this though!

 

🙂

 

Share this post


Link to post
Share on other sites

As a note, I can spawn items manually.

 

Such as running this from IS console:

 

_veh = "CUP_O_BTR90_RU" createVehicle(position player);  <-- This works perfectly.

 

But when getting this item from the trader or IS menu, nothing happens in IS, trader gives a 'Code 13' error.

 

There is ONE possibility that I have not done/checked...and that is I have not updated my IS in about 7 months.  So, I have the new one  now and I will give that a shot.  Since a lot of this is 'run' thru IS, and my manal spawn was not, leads me to think it is an IS issue, as being 'out dated'.  Just a guess...  😉

 

 

🙂

 

Share this post


Link to post
Share on other sites

Very strange bug. I like strange bugs 😉 they are like riddles that need to be solved.
You saying it only appeared after latest CUP update , so how it can be IS issue that has been running at the same version for about 7 months now? 
Need more info to see the full picture here.
 

  • Thanks 1

Share this post


Link to post
Share on other sites

Edit:

 

I installed latest version of IS and to my belief, it made no difference.  I still can not spawn any CUP vehicle.  I still can use the 'script' to spawn in stuff, so I know ARMA/Exile 'sees' the mod.

 

Also, as you were replying...  😉  I actually removed IS and it still does this.  And as far as a possible IS issue, well, he could have change the code to reflect new code in CUP as an example.

 

But it did not matter.  With no IS, old IS, or new IS, it still gives me a Code 13.  BUT, vanilla stuff pops right in after purchase!

 

Go figure...

 

😉

 

Share this post


Link to post
Share on other sites

As I am ASSUMING the appeared after that, because it did work and I never tested it after the update...so it is an ASSUMPTION...and I think we both know what that means....  😉

 

🙂

 

Share this post


Link to post
Share on other sites

Lets analyze the "raw" info. No assumptions 😉 Assumptions are bad for the health (server health).
My setup is similar including > Exile+Cup+IS and infi vehicle spawns are working just fine for me. RPT logs are crystal clear? Is this happening to ALL CUP Vehicles ?
Have you tried re-configuring the traders ? Like placing helipad at different locations? Or make a new trader from scratch ?
Whats your mods -params ?  No way Cup Vehicles mod updated to a different folder? No spaces, no caps (linux server?) ? Have you deleted old CUP keys?
 

  • Thanks 1

Share this post


Link to post
Share on other sites

As far as what you stated; no, I have not set up a new trader, different locations, etc.  Also, when I can not spawn a CUP vehicle (via IS) in an area about 1 square km in size, which is basically a field, then there is a problem that does not effect the traders at all.

 

Another reason is that for 2+ years my 'arrangement' has worked.   The last changes made was with the last Exile update. 

 

Also, if it was a trader issue (my thinking) then NOTHING should spawn as I have CUP and Exile vehicles in one file.  So none of them should work.  But the vanilla always work.

 

BUT, when I was getting the new IS, he (Chris) had listed a 'RPT Reader' of sorts.  While playing with it, I saw something that COULD be the issue and that be a corrupt Exile server file(s).

 

Per Chris (IS) in the 'ReadMe' file: 

 

You have a problem?
Try: http://bit.ly/RPTWATCH
The program helps to find errors in your setup!

 

(This a 'basic' RPT reader/filter - You can do the same with NotePad++)

 

(The above link is for a just a download link for an EXE file, nothing else)

 

 

In My Latest RPT File (in part):

 

17:45:22 File exile_server\code\ExileServer_object_vehicle_carefulCreateVehicl..., line 23
17:45:22 File exile_server\code\ExileServer_object_vehicle_createNonPersistent..., line 17
17:45:22 File exile_server\code\ExileServer_world_spawnVehicles.sqf..., line 45
17:45:22 File exile_server\code\ExileServer_object_vehicle_carefulCreateVehicl..., line 23
17:45:22 File exile_server\code\ExileServer_object_vehicle_createNonPersistent..., line 17
17:45:22 File exile_server\code\ExileServer_world_spawnVehicles.sqf..., line 45
17:45:22 File exile_server\code\ExileServer_object_vehicle_carefulCreateVehicl..., line 23
17:45:22 File exile_server\code\ExileServer_object_vehicle_createNonPersistent..., line 17
17:45:22 File exile_server\code\ExileServer_world_spawnVehicles.sqf..., line 45
17:45:22 File exile_server\code\ExileServer_object_vehicle_carefulCreateVehicl..., line 23
17:45:22 File exile_server\code\ExileServer_object_vehicle_createNonPersistent..., line 17
17:45:22 File exile_server\code\ExileServer_world_spawnVehicles.sqf..., line 45
17:45:23 File exile_server\code\ExileServer_object_vehicle_carefulCreateVehicl..., line 23
17:45:23 File exile_server\code\ExileServer_object_vehicle_createNonPersistent..., line 17
17:45:23 File exile_server\code\ExileServer_world_spawnVehicles.sqf..., line 45
17:45:23 File exile_server\code\ExileServer_object_vehicle_carefulCreateVehicl..., line 23
17:45:23 File exile_server\code\ExileServer_object_vehicle_createNonPersistent..., line 17
17:45:23 File exile_server\code\ExileServer_world_spawnVehicles.sqf..., line 45
17:45:24 File exile_server\code\ExileServer_object_vehicle_carefulCreateVehicl..., line 23

 

Then I get other RPT's with:

 

11:28:54 "ExileServer - Creating spawn zone vehicles..."
11:28:54 "ExileServer - Spawning Dynamic Vehicles. GridSize: 2200 Vehs/Grid: 2"
11:28:55 Error in expression <000)
];
_vehicleObject = createVehicle [_vehicleClassName, _temporaryPositionInO>
11:28:55   Error position: <_vehicleClassName, _temporaryPositionInO>
11:28:55   Error Undefined variable in expression: _vehicleclassname
11:28:55 File exile_server\code\ExileServer_object_vehicle_carefulCreateVehicle.sqf, line 23

 

 

I backup every RPT file when the server reboots and not every RPT file has the above errors in them.  Most do though have these errors...but NOT ALL.   ???

 

So what I will do tonight (here 1834), will be to 're-install' the server files and see if that makes a difference.

 

I just can not see what the issue may be.

 

Looking at the DB even makes things even MORE WEIRD!  😉

 

 

From The DB (some parts cut out due to size):

 

'CUP_B_RG31_M2_OD_USMC', '2019-10-03 17:40:50', '76......85',  '[[\"bipod_01_F_mtp\",\"muzzle_snds_338_green\",\"H_HelmetLeaderO_ocamo\",\"O_NVGoggles_ghex_F\",\"muzzle_snds_93mmg\",\"optic_LRPS_tna_F\",\"optic_AMS_khk\"],[1,1,1,1,1,1,1]]', '[[\"Exile_Item_Surstromming_Cooked\",1],[\"Exile_Item_EMRE\",1],[\"Exile_Item_DuctTape\",1],[\"Exile_Item_CanOpener\",1],[\"Exile_Item_PlasticBottleFreshWater\",1],[\"Exile_Item_DuctTape\",1],[\"Exile_Item_InstaDoc\",1],[\"Exile_Item_InstaDoc\",1],[\"Exile_Item_InstaDoc\",1],[\"Exile_Item_InstaDoc\",1],[],[],[[],[]]],[\"U_O_V_Soldier_Viper_F\",[],[],[[],[]]],[\"B_Bergen_mcamo_F\",[],[],[[],[]]]]', '2019-10-06 15:05:07', '6791', NULL, '0', '', NULL, '', ''

 

So, someone bought a CUP vehicle about 2 weeks ago...has stuff in it and everything...worked for them!

 

 

I am wondering if it is just ME that has an issue....I will look into that as well.  The DB clearly shows that that person bought a CUP car and shows that he had no issues as well...

 

...Strange...

 

SO...what I am planning to do is this (not necessarily in this order😞

 

Whack my ARMA profile (in case mine is 'too big' or corrupted, etc.).

 

Get another player to buy a CUP car - A true test to test is it me or everybody (which should not be the case per the DB CUP vehicle).

 

Re-Install the Exile server files - Due to errors in RPT file.

 

 

 

And again,  I do wish to thank you wholeheartedly for your help.  I do appreciate it!

 

🙂

 

 

Share this post


Link to post
Share on other sites

***  PROBLEM SOLVED  - 'Code 13'  ***

 

 

As a programmer for 40+ years, I KNEW that something was 'afoot' with the CUP mods.  I also know that 'lazy' programmers will use one error message for many errors.  A 'catch all' error code you might say.  I have been guilty of this as well at times.

 

This is what the  devs did with Exile in this section.  The 'Code 13' is used for more things that just 'not enough room'.

 

In my case, Exile gave me that error even when standing in a empty field when trying to spawn a CUP item.

 

I also knew roughly, that the issue appeared after the latest CUP update.

 

 

 

What was the issue that caused this 'fake' Code 13?

 

Well, I had 3 CUP folders to update.  Since my server is in my house and my main PC had the CUP updates already, I opened the folder on my server and copied them over.

 

Doing this, caused me to make a VERY NOVICE MISTAKE!   And here it is:

 

 

Old CUP Folder Name (Example)

@CUPUnits

 

 

New CUP Folder Name (Example)

@CUP Units

 

 

Start-Up File For Loading Mods:

@CUPUnits

 

 

 

So what happens is Exile loads just fine with no errors.  You go to the traders and since the 2 files required for items are correct, Exile showed the CUP items in the traders as well as in InfiSTAR.  BUT, when trying to 'get' that unit, it would fail with a 'Code 13' error which was in fact, is wrong.  My Exile basically had an 'empty shell' for the units.  Just a 'brochure' of that item.

 

After renaming the CUP folders properly, surprise!  Everything works now as it should.  🙂

 

 

So, the 'moral' of this story is:  Always remember that an error message MIGHT be from lazy programmers, so ALWAYS look at that error message as well as other things that could cause a failure.

 

 

 

And @chernaruski, I greatly appreciate your help and I do apologize to you for wasting your time on a stupid novice mistake on my behalf.

 

 

Thank you once again!

 

 

🙂

 

 

 

  • Thanks 1

Share this post


Link to post
Share on other sites

Niiice. 
No need to thank me, it's not like I'm the one who found the solution. I was shooting all directions here

Quote

Whats your mods -params ?  No way Cup Vehicles mod updated to a different folder? No spaces, no caps (linux server?) ? Have you deleted old CUP keys?


Glad you solved this, there are bugs that can be very evasive sometimes.  And yeah , one sided info about Code 13 and its possible solution of "making more space for vehicle" isn't helping.
Good info for the following generations 😉


PS: If I'm correct, I think you could have avoided that issue by adding requiredAddon to your mission directly. So if you have some mod missing (not loaded in your case) , it just tells you. Instead of "we are fine , let's start things up"

  • Thanks 1

Share this post


Link to post
Share on other sites

You are correct on you mentioning the 'file name thing', I merely overlooked it as it SHOULD have been correct as it has been for 2+ years...thus my comment about my 'novice mistake'.  I KNOW better...at least I thought I did...  ;)

 

 

The 'not enough space' is from the command they use as well as what I remembered from others with this issue.

 

findEmptyPosition = Searches for an empty position around specified position.

 

https://community.bistudio.com/wiki/findEmptyPosition

 

IF that is what you're talking about.

 

And I do believe you're correct on inserting the 'text' into the mission.sqm.  Good job!  I never thought about that one!  :)

 

It would be a form of 'error checking' and you can NEVER have enough of that!

 

Again, thank you for your help!

 

:)

 

Share this post


Link to post
Share on other sites

×