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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed silent fail on player name change #391

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

Conversation

KirillBorunov
Copy link
Contributor

@KirillBorunov KirillBorunov commented Nov 27, 2021

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

Changed to InvalidOperationException as you requested, I agree with that.

I revised all the other calls into SAMP and return codes, seems no more checks like this one are needed.
I ignored the return codes for "Player not exists", "Vehicle not exists", "Object not exists", and so on... because if those are destroyed then the SampSharp instance for that entity will be disposed.
And also I ignored the parameters check errors, because I think we should add own checks in SampSharp to throw descriptive and specific errors. SAMP is returning only one error code for different situations.

PS: sorry for creating new PR (the old one is #388), I messed up the old fork 馃槄

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
1 participant