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
endIndex
| Code | Meaning |
|---|---|
account_unavailable | the society bank account could not be reached |
already_crafting | a craft is already running |
already_handcuffed | the player is already cuffed |
already_open | the page is already open |
already_owned | the player already holds that licence |
badge_taken | another member of that job holds that badge |
being_escorted | the player is being dragged rather than dragging |
billing_disabled | no job of this player has billing switched on |
closed_while_loading | the worker ID card was closed while its head shot rendered |
dutyhud_disabled | the duty HUD is switched off in the config |
give_failed | the licence resource rejected the write |
grade_too_low | the player's grade is below the required minimum |
handcuffed | cuffed players cannot open this |
hidden | hidden by hideDutyHUD |
insert_failed | the database insert failed |
insufficient_funds | the society account does not hold that much |
invalid_account | account must be legal or illegal |
invalid_action | action must be a non-empty string |
invalid_amount | amount must be a positive whole number within the configured cap |
invalid_badge | badge format is wrong (up to four digits, one optional leading letter) |
invalid_cuff_type | cuff type must be 0 or 1 |
invalid_data | the argument must be a table |
invalid_duty | duty must be a boolean |
invalid_interaction_id | no interaction with that id |
invalid_job | job name must be a non-empty string |
invalid_license | licence type must be a non-empty string |
invalid_message | message must be a non-empty string |
invalid_ped | that ped does not exist |
invalid_player | player id must be a number |
invalid_state | closed state must be a boolean |
invalid_type | interaction type must be a non-empty string |
missing_url | url is required |
no_access | the job does not grant this action |
no_badge | the player has no badge for that job |
no_badges | no badges have been issued for that job |
no_banking_bridge | society banking is set to none |
no_billing_access | billing is off for the sender's jobs, or their grade is too low |
no_bills | the player has no unpaid bills |
no_duty_job | no job with a duty point, so there is nothing to show |
no_duty_point | the job has no duty point the player counts as always on duty |
no_job | the player has no job in that slot |
no_licenses | the list is empty |
no_menu_configured | no restaurant menu is set up |
no_permission | wrong job or grade for this interaction |
no_player_nearby | nobody within range |
no_recipes | that crafting point has no recipes |
no_workerid_configured | no worker ID is set up |
nobody_online | no member of that job is online |
none_configured | no interaction of that type the player can use |
not_a_second_job | that job is not marked as usable in the second slot |
not_carrying | the ped is not carrying anyone |
not_escorting | no escort is running |
not_handcuffed | the player is not cuffed |
not_loaded | interactions have not reached the client yet |
not_on_duty | the job has a duty point and the player is clocked out |
not_open | nothing is open to close |
not_owned | the player does not hold that licence |
off_duty | clocked out |
open | the business is open |
player_dead | the player is fatally injured |
player_not_found | no such player on the server |
rejected_by_server | the server refused to open it (out of range, or access changed) |
reserved_job | public cannot be assigned to a player |
revoke_failed | the licence resource rejected the delete |
same_player | source and target must differ |
target_not_found | no such target player on the server |
too_far | out of range of the interaction |
unknown_action | not an action, category or alias check the spelling |
unknown_grade | that job has no such grade |
unknown_job | no job with that name |
unknown_license | no licence type with that name |
wrong_interaction_type | that id exists but is a different kind of point |
Legacy Exports
Exports that shipped before this documentation. They still work, but they do not follow the answer/reason convention used everywhere else.
Events
This section lists all client-side and server-side events in this script. Events allow you to add custom listeners that capture and respond to actions triggered by this script.