Quote:
Originally Posted by HamletEagle
[code]
Don't get me wrong, I'm not picking on you, I'm trying to explain some stuff that seems to confuse you.
|
Code:
It won't throw any warning. cs_get_user_team is already tagged as CsTeams. You should take a look at how tags work.
In some cases due to differences in definition tags, becomes an unreadable command array (It's always like this)
Code:
Same thing, tagging a float as a Float makes no sense.
of course, it makes sense for pawn just like c++
if you don't pay attention to the case, it will cause "Tag mismatch warming". You can try this
PHP Code:
MessageBox::Show("message","title, ..."
diffrence (it will cause fatal fault)
PHP Code:
messageBox::Show("message","title, ..."
--
Code:
First line is wrong, p_Gravityshould be tagged as Float(i.e. new Float:pGravity[MAX_PLAYERS). Also p usually stands from "pointers", so you should use f if you really want to use HN.
Second line is also wrong, float it's a custom tag, the default one is called Float. Again, variable should be tagged as Float, not the value(because the value it's already a float).
You're right about that. This is my fault
Code:
I would also like to add something about this kind of initialization:
new var[33] = 1
This won't set all array cells to 1, only the first one(var[0] is 1, but var[1],var[2], ... are 0). If you want to initialize the entire array with 1, you should do:
new var[33] = {1, ...}
You can try this will not make a difference.
HTML Code:
Won't throw any error if the cvar is present. Anyway, don't use cvars, use pcvars, they are faster([tt]get_pcvar_num[/tt]).
if plugin send this command to client all time, it will cause
SZ_getSpace overflow without FSB_ALLOW OVERFLOW
Code:
What you did here is basically to cache the cvar value, so if it's changed in-game it won't take affect until the next map change.
The fact that this change in client isn't healthy will lead to mistakes.
For this reason, these are done with "cfg" before the game.
Code:
p_Name should be 32, not 33 and in get_user_name you should put size - 1, so 31. Indexing pName by MAX_PLAYERS is confusing. You would do that when you want to have an array for players, but here you are using a char array to store the name of ONLY ONE player at a time. So just put 32.
Amxmodx (1.8.3-dev) after updating "MAX_PLAYERS 32 and [MAX_PLAYERS+1]" is changed.
if you do this, you will encounter a lot of errors
new functuality from AMXX amxconst.inc
MAX_PLAYERS 33 and and without + 1 ([MAX_PLAYERS])
Code:
While you could argue that's for readability it does not provide any performance optimization.
That's right.
I made the necessary explanations for you, thank you for your comment.