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

Add @note in get_user_msgid() #506

Merged
merged 7 commits into from Aug 20, 2018

Conversation

OciXCrom
Copy link
Contributor

@OciXCrom OciXCrom commented Jul 24, 2018

This function should not be used inside plugin_precache(), as it will return 0 if the server was just started.

https://forums.alliedmods.net/showthread.php?t=308592

@@ -2142,6 +2142,8 @@ native random_num(a, b);
* @note Example usage: get_user_msgid("TextMsg")
* @note The message id is unique as long as the server is running, but might
* change between updates. They should not be hardcoded into plugins.
* @note This function should not be used inside plugin_precache(), as it
Copy link
Member

Choose a reason for hiding this comment

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

It's kind of weirdly phrased. The context should be first. My English is horrible but I would go like:

On first server start, this function returns 0 inside plugin_precache(). Consider hooking RegUserMsg in order to retrieve the message id.

Something like that with a better english if not good.

Copy link
Contributor Author

@OciXCrom OciXCrom Aug 9, 2018

Choose a reason for hiding this comment

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

@Arkshine Done. Btw, your English is great.

@Arkshine Arkshine merged commit 6528677 into alliedmodders:master Aug 20, 2018
@OciXCrom OciXCrom deleted the get_user_msgid-note branch August 21, 2018 12:54
OciXCrom added a commit to OciXCrom/amxmodx that referenced this pull request Sep 10, 2018
* Update lang.inc

* Update lang.inc

* Update amxmodx.inc

* Improve @note phrasing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants