Raised This Month: $ Target: $400
 0% 

Can anyone check if there is a better way to do this?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-08-2022 , 22:45   Re: Can anyone check if there is a better way to do this?
Reply With Quote #4

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).

Quote:
Originally Posted by Alahmoh View Post
the plugin is private ... btw you dont need to test it because it works perfectly i only want to get rid of warnings.
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:
ShowHudplayer ) {
        new 
R,G,B,X,Y// Line 1394 
__________________
fysiks is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:41.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode