mirror of
https://gitlab.com/rubenwardy/awards.git
synced 2024-12-28 03:30:40 +01:00
Add assert to awards.player()
This commit is contained in:
parent
51ccb8c1b6
commit
ee4931ae6e
1
api.lua
1
api.lua
@ -91,6 +91,7 @@ function awards.load()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function awards.player(name)
|
function awards.player(name)
|
||||||
|
assert(type(name) == "string")
|
||||||
local data = awards.players[name] or {}
|
local data = awards.players[name] or {}
|
||||||
awards.players[name] = data
|
awards.players[name] = data
|
||||||
data.name = data.name or name
|
data.name = data.name or name
|
||||||
|
Loading…
Reference in New Issue
Block a user