table.fexist
Check if the field exist in the table
| Argument | Data Type | Needed | Default | Description |
|---|---|---|---|---|
Table | table | - | The table | |
Field | string | - | The field to check |
Returns
| Data Type | Description |
|---|---|
| boolean | True if field exist, false if field dont exist |
Dont need to be called every frame
Example
local tabletocheck = {
msg = "Message",
another = 2
}
print(table.fexist(tabletocheck, "msg"))
print(table.fexist(tabletocheck, "utility"))
Expected result
true
false