FAQ - TrevorBarns/luxart-vehicle-control GitHub Wiki
- Why is this vehicle still using the default profile even after I created a table in SIRENS_ASSIGNMENTS?
- How can I change the default HUD location for my server?
- How do I fix "SCRIPT ERROR: @lvc/UTIL/cl_utils.lua:XX bad argument #1 to 'pairs' (table expected, got nil)"?
Why is this vehicle still using the default profile even after I created a table in SIRENS_ASSIGNMENTS?
The most likely cause for this is the use of an incorrect key in SIRENS_ASSIGNMENTS. The key in siren assignments needs to align with the vehicles <gameName>
as found in vehicles.meta
. The keys first 11 characters also need to be unique due to base game limitations.
To verify this look at these two methods:
-
In game using LVC: Enter the car in questions, navigate to 'Storage Management'. The description of the 'Save Profile' button will read "Using DEFAULT profile for "<gameName>". Ensure this matches identically (case-sensitive) to the key as outlined in SIREN_ASSIGNMENTS.
-
Out of game using
vehicles.meta
: Locate thevehicles.meta
file and verify that the vehicle in questions<gameName>XXXXXXXX</gameName>
= ['XXXXXXXX'] in SIREN_ASSIGNMENTS.
All HUD related functions/code is located in the UI folder. The default position of the HUD is set in UI/html/style.css
.
#sirenbox {
display: none;
position: absolute;
overflow: hidden;
width: 602px;
height: 161px;
left: 0%;
top: 68%;
transform-origin: left top;
transform: scale(0.6);
background-image: url("../textures/background.png");
}
The relevant attributes are: left, top, and transform-origin.
-
left determines how far in percentage of the screen resolution should the HUD be placed from the left edge. If you wanted to right align the HUD you could change this to
right: XX%
, 0% being against the right edge of the display. - top determines how far down from the top the HUD should be placed.
-
transform-origin attribute determines which way the HUD should expand on size adjustment. For a bottom right aligned HUD you would want the transform-origin to be
right bottom
. This ensures that the HUD does not expand outside of the screen space.
How do I fix "SCRIPT ERROR: @lvc/UTIL/cl_utils.lua:XX bad argument #1 to 'pairs' (table expected, got nil)"?
This indicates that there was a problem loading your SIREN_ASSIGNMENTS table from your SIRENS.lua.
What causes the table to not be loaded?
-
Invalid symbol present:
- You have accidentally made a typo and left a random symbol somewhere.
- You pasted text from a website. Typically
RequestScriptAudioBank(“XXX”, false)
. Where the the website uses UTF8“
instead of ASCII"
. - You have mismatched curly brackets. For every open bracket
{
there needs to be a closing bracket}
. Too many of either will result in failure to load. Use a smart text editor like Notepad++ to highlight brackets or an online tool.
-
Missing SETTINGS.lua or missing SIREN_ASSIGNMENTS table in SIRENS.lua