Can anyone check if there is a better way to do this?
Code:
public plugin_init( ) {so i wonder if there is a better way to get the same results without getting 17 warnings? |
Re: Can anyone check if there is a better way to do this?
You should post the full plugin so that we can easily test it since you didn't provide any information about the warnings. The easier you make it for us, the more likely you'll get a quick answer.
|
Re: Can anyone check if there is a better way to do this?
Quote:
Code:
#define Struct enumWelcome to the AMX Mod X 1.8.1-300 Compiler. Copyright (c) 1997-2013 ITB CompuPhase, AMX Mod X Team Warning: Tag mismatch on line 641 Warning: Tag mismatch on line 642 Warning: Tag mismatch on line 649 Warning: Tag mismatch on line 651 Warning: Tag mismatch on line 653 Warning: Tag mismatch on line 687 Warning: Tag mismatch on line 689 Warning: Tag mismatch on line 691 Warning: Tag mismatch on line 695 Warning: Tag mismatch on line 695 Warning: Tag mismatch on line 695 Warning: Tag mismatch on line 695 Warning: Tag mismatch on line 1394 Warning: Function "ChooseTeam" should return a value on line 2096 Warning: Function "Show_HudMenu" should return a value on line 2631 Warning: Function "Show_HudMenu" should return a value on line 2636 Warning: Function "Show_HudMenu" should return a value on line 2641 Warning: Function "Show_HudMenu" should return a value on line 2658 Header size: 6688 bytes Code size: 120912 bytes Data size: 405420 bytes Stack/heap size: 16384 bytes; max. usage is unknown, due to recursion Total requirements: 549404 bytes 18 Warnings. Done. |
Re: Can anyone check if there is a better way to do this?
btw the Warning: Tag mismatch on line.
happens on the lines of X = something; Y = something; even thou if i make it two == it stops sends warning, it will make the plugin not work. |
Re: Can anyone check if there is a better way to do this?
some changes i will do
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
Code:
Warning: Function "ChooseTeam" should return a value on line 2096Code:
Warning: Tag mismatch on line 641example you have a boolean variabile but you store in that variabile a int number |
Re: Can anyone check if there is a better way to do this?
Quote:
and for the other warnings i just removed the return. and all the warnings got removed still thanks for your help because when you told me static i knew that numbers should be stored to float variable. |
Re: Can anyone check if there is a better way to do this?
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:
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:
|
Re: Can anyone check if there is a better way to do this?
Quote:
|
| All times are GMT -4. The time now is 15:41. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.