Skip to content

Conversation

@KirillBorunov
Copy link
Contributor

This fixes #387
Error description taken from here: https://open.mp/docs/scripting/functions/SetPlayerName

{
if(PlayerInternal.Instance.SetPlayerName(Id, value) == -1)
{
throw new Exception("The name is already in use, too long or has invalid characters.");
Copy link
Owner

Choose a reason for hiding this comment

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

Could you change it to InvalidOperationException?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK. But wait, I'm adding similar return codes handling on the other setters, seems that all lacks these checks.

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.

Setting invalid or occupied player name is failing silently

2 participants