HEX
HexscriptsJobscreatorExports

Reason Code Index

Every reason code an export can return, with its meaning. Codes are stable snake_case strings you can safely branch on.

Reasons are stable snake_case codes, never translated text, so you can safely branch on them.

local ok, err = exports['hex_jobscreator']:openKitchen()

if not ok then
    if err == 'not_on_duty' then
        -- tell the player to clock in
    elseif err == 'too_far' then
        -- walk them to the marker
    end
end

Index

CodeMeaning
account_unavailablethe society bank account could not be reached
already_craftinga craft is already running
already_handcuffedthe player is already cuffed
already_openthe page is already open
already_ownedthe player already holds that licence
badge_takenanother member of that job holds that badge
being_escortedthe player is being dragged rather than dragging
billing_disabledno job of this player has billing switched on
closed_while_loadingthe worker ID card was closed while its head shot rendered
dutyhud_disabledthe duty HUD is switched off in the config
give_failedthe licence resource rejected the write
grade_too_lowthe player's grade is below the required minimum
handcuffedcuffed players cannot open this
hiddenhidden by hideDutyHUD
insert_failedthe database insert failed
insufficient_fundsthe society account does not hold that much
invalid_accountaccount must be legal or illegal
invalid_actionaction must be a non-empty string
invalid_amountamount must be a positive whole number within the configured cap
invalid_badgebadge format is wrong (up to four digits, one optional leading letter)
invalid_cuff_typecuff type must be 0 or 1
invalid_datathe argument must be a table
invalid_dutyduty must be a boolean
invalid_interaction_idno interaction with that id
invalid_jobjob name must be a non-empty string
invalid_licenselicence type must be a non-empty string
invalid_messagemessage must be a non-empty string
invalid_pedthat ped does not exist
invalid_playerplayer id must be a number
invalid_stateclosed state must be a boolean
invalid_typeinteraction type must be a non-empty string
missing_urlurl is required
no_accessthe job does not grant this action
no_badgethe player has no badge for that job
no_badgesno badges have been issued for that job
no_banking_bridgesociety banking is set to none
no_billing_accessbilling is off for the sender's jobs, or their grade is too low
no_billsthe player has no unpaid bills
no_duty_jobno job with a duty point, so there is nothing to show
no_duty_pointthe job has no duty point the player counts as always on duty
no_jobthe player has no job in that slot
no_licensesthe list is empty
no_menu_configuredno restaurant menu is set up
no_permissionwrong job or grade for this interaction
no_player_nearbynobody within range
no_recipesthat crafting point has no recipes
no_workerid_configuredno worker ID is set up
nobody_onlineno member of that job is online
none_configuredno interaction of that type the player can use
not_a_second_jobthat job is not marked as usable in the second slot
not_carryingthe ped is not carrying anyone
not_escortingno escort is running
not_handcuffedthe player is not cuffed
not_loadedinteractions have not reached the client yet
not_on_dutythe job has a duty point and the player is clocked out
not_opennothing is open to close
not_ownedthe player does not hold that licence
off_dutyclocked out
openthe business is open
player_deadthe player is fatally injured
player_not_foundno such player on the server
rejected_by_serverthe server refused to open it (out of range, or access changed)
reserved_jobpublic cannot be assigned to a player
revoke_failedthe licence resource rejected the delete
same_playersource and target must differ
target_not_foundno such target player on the server
too_farout of range of the interaction
unknown_actionnot an action, category or alias check the spelling
unknown_gradethat job has no such grade
unknown_jobno job with that name
unknown_licenseno licence type with that name
wrong_interaction_typethat id exists but is a different kind of point

On this page