Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated add_skill.lua to work #60

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

trokka
Copy link
Contributor

@trokka trokka commented Feb 9, 2025

The script was not working but now it is.
Also thanks to "Tofame" that clarified an important change to remove unnecessary playerloop:
findPlayerByName
to
getPlayerByName

And also added a print for anyone who wishes to see this in their terminal (has to be uncommented)
--print("Player " .. target:getName() .. " was given " .. count .. " " .. split[2] .. "(s).")

return player
end
end
return nil
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the function getPlayerByName(name)

end

local targetName = split[1]:trim()
local target = getPlayerByName(targetName)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change:
local target = getPlayerByName(targetName)
to:
local target = Player(targetName)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants