 |
|
Member
|

08-09-2022
, 03:11
Re: Can anyone check if there is a better way to do this?
|
#5
|
Quote:
Originally Posted by fysiks
Declaring those variables as static is not required at all. It is a trivial optimization that will not make any appreciable difference any in regard. The two exceptions are very large arrays or for large/many variables that are called very often (like on a think forward).
I understand that some people don't want to post their whole plugin but if people do post it it makes it much easier for us to compile it ourselves to see the actual warnings. It's not always easy to see errors/warnings by scanning random source code.
So, having the errors/warnings along with the corresponding lines of code is important to make things easier and quicker for everybody.
In the event that you're wanting to only post a little code, it is helpful to post the code snippets with call outs to indicate the line numbers. One nice and easy way to do this is to post your code in [php][/php] tags (to get syntax highlighting) and then add a comment on the lines that have errors. For example:
[php]
ShowHud( player ) {
new R,G,B,X,Y; // Line 1394
[/php]
gives this:
PHP Code:
ShowHud( player ) {
new R,G,B,X,Y; // Line 1394
|
thanks for the advice, again.
|
|
|
|