functions needs to have a name using one of 3 ways unless they’re anonymous.
local *name* = function(...)
end
or
function *name*(...)
end
or
local function *name*(...)
end
yeah but what am i supposed to identify with the function
any name. Example:
function doStuff(player, badgeId, message)
...
end
Its not that hard to name a function considering it’s case sensitive, you just need to give it a unique name
so like function “player(player, badgeId, message)”?
That’s a pretty bad name since you declare a parameter with the same name. You should name functions based on what they do. In this case local function home_repossessed(player, badgeId, message)
may be apt since the next lines message about repossession as an ending.
When posting code it is much better to paste it between three ticks (```) or click the </> button for “Preformatted text”. There are other errors with your code but I think this will be what you want as a function.
local function home_repossessed(player)
Events.GiveEnding:FireClient(player, 2128141387, "you got ur home repossessed nice job")
end