Jump to content
Artyom567

Insurance Script not working

Recommended Posts

Hi, i've been working through the insurance tutorial and have worked through it twice now. 

Both times i got the same errors across my server and client .rpt logs and ingame which are below;

image.thumb.png.19867ce40578dde7051e019c6d1bf9e5.png

In game issue: no vehicle prices or information and when you choose a retrieve/sell/ensure option you get the "The selection had a error" message. I assumed this comes from the client .rpt "zero divisor and LifeCgfVehicles" errors which are; 

16:05:30 ": LifeCfgVehicles class doesn't exist"
16:05:30 Wrong text element 'null'
16:05:30 Wrong text element 'null'
16:05:30 Wrong text element 'null'
16:05:30 Wrong text element 'null'
16:05:30 Error in expression <call life_fnc_numberText,
(_vehicleInfo select 8),
(_vehicleInfo select 11),
(_v>
16:05:30   Error position: <select 8),
(_vehicleInfo select 11),
(_v>
16:05:30   Error Zero divisor
16:05:30 File dialog\function\fn_garageLBChange.sqf [life_fnc_garageLBChange], line 135
16:05:41 Error in expression <["B_APC_Wheeled_03_cannon_F",0,<null>]>
16:05:41   Error position: <<null>]>
16:05:41   Error Invalid number in expression
16:05:41 Error in expression <["B_APC_Wheeled_03_cannon_F",0,<null>]>
16:05:41   Error position: <<null>]>
16:05:41   Error Invalid number in expression

Arma3_x64_2019-04-28_16-02-30.rpt

Server.rpt error:

14:50:57 Error in expression <\fn_insureCar.sqf [TON_fnc_insureCar]"
?

private["_vid","_pid","_query","_>
14:50:57   Error position: <?

private["_vid","_pid","_query","_>
14:50:57   Error Invalid number in expression
14:50:57 File \life_server\Functions\Systems\fn_insureCar.sqf [TON_fnc_insureCar], line 1
14:50:57 Error in expression <\fn_insureCar.sqf [TON_fnc_insureCar]"
?

private["_vid","_pid","_query","_>
14:50:57   Error position: <?

private["_vid","_pid","_query","_>
14:50:57   Error Invalid number in expression
14:50:57 File \life_server\Functions\Systems\fn_insureCar.sqf [TON_fnc_insureCar],

arma3server_x64_2019-04-28_14-50-45.rpt

I've had a good lo ok around and tried the fixes mentioned in the tutorial and to see if i can see anything amiss  I've had no luck so far.  A further point to note is i can store vehicles button cannot do anything with them once they're in the garage. Database seems to be working fine also. 

Any help/advice is greatly appreciated,

fn_garageLBChange (3).sqffn_insureCar.sqf

 

Arma3_x64_2019-04-28_16-02-30.rpt

Share this post


Link to post
Share on other sites

The only thing I had an issue with this was the structuredText 

(CONTROL(2800,2803)) ctrlSetStructuredText parseText format [
    (localize "STR_Shop_Veh_UI_RetrievalP")+ " <t color='#8cff9b'>$%1</t><br/>
    " +(localize "STR_Shop_Veh_UI_SellP")+ " <t color='#8cff9b'>$%2</t><br/>
    " +(localize "STR_Shop_Veh_UI_MaxSpeed")+ " <t color='#8cff9b'>%3 km/h</t><br/>
    " +(localize "STR_Shop_Veh_UI_HPower")+ " <t color='#8cff9b'>%4</t><br/>
    " +(localize "STR_Shop_Veh_UI_PSeats")+ " <t color='#8cff9b'>%5</t><br/>
    " +(localize "STR_Shop_Veh_UI_Trunk")+ " <t color='#8cff9b'>%6</t><br/>
    " +(localize "STR_Shop_Veh_UI_Fuel")+ " <t color='#8cff9b'>%7</t>
    " +(localize "STR_Shop_Veh_UI_Color")+ " <t color='#8cff9b'>%8</t><br/>
    Price to Insure: <t color='#8cff9b'>$%9</t><br/>
    Insured: <t color='#8cff9b'>%10</t><br/>
    ",
    [_retrievePrice] call life_fnc_numberText,
    [_sellPrice] call life_fnc_numberText,
    (_vehicleInfo select 8),
    (_vehicleInfo select 11),
    (_vehicleInfo select 10),
    if (_trunkSpace isEqualTo -1) then {"None"} else {_trunkSpace},
    (_vehicleInfo select 12),
    _vehicleColor,
    [_insurancePrice] call life_fnc_numberText,
    if (_insurance == 1) then {"<t color='#8cff9b'>true</t>"} else {"<t color='#FF0000'>false</t>"},
    (_vehicleInfo select 9)
];

This is working for me. 

 

Share this post


Link to post
Share on other sites
18 minutes ago, ItsLega said:

The only thing I had an issue with this was the structuredText 

(CONTROL(2800,2803)) ctrlSetStructuredText parseText format [
    (localize "STR_Shop_Veh_UI_RetrievalP")+ " <t color='#8cff9b'>$%1</t><br/>
    " +(localize "STR_Shop_Veh_UI_SellP")+ " <t color='#8cff9b'>$%2</t><br/>
    " +(localize "STR_Shop_Veh_UI_MaxSpeed")+ " <t color='#8cff9b'>%3 km/h</t><br/>
    " +(localize "STR_Shop_Veh_UI_HPower")+ " <t color='#8cff9b'>%4</t><br/>
    " +(localize "STR_Shop_Veh_UI_PSeats")+ " <t color='#8cff9b'>%5</t><br/>
    " +(localize "STR_Shop_Veh_UI_Trunk")+ " <t color='#8cff9b'>%6</t><br/>
    " +(localize "STR_Shop_Veh_UI_Fuel")+ " <t color='#8cff9b'>%7</t>
    " +(localize "STR_Shop_Veh_UI_Color")+ " <t color='#8cff9b'>%8</t><br/>
    Price to Insure: <t color='#8cff9b'>$%9</t><br/>
    Insured: <t color='#8cff9b'>%10</t><br/>
    ",
    [_retrievePrice] call life_fnc_numberText,
    [_sellPrice] call life_fnc_numberText,
    (_vehicleInfo select 8),
    (_vehicleInfo select 11),
    (_vehicleInfo select 10),
    if (_trunkSpace isEqualTo -1) then {"None"} else {_trunkSpace},
    (_vehicleInfo select 12),
    _vehicleColor,
    [_insurancePrice] call life_fnc_numberText,
    if (_insurance == 1) then {"<t color='#8cff9b'>true</t>"} else {"<t color='#FF0000'>false</t>"},
    (_vehicleInfo select 9)
];

This is working for me. 

 

brilliant, cheers buddy i'll give that a shot !  from what it looks like its not finding that specific information of the vehicles so hopefully this is it.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...