warning suppression in SM 1.11
Recently because of the issue with cs:go, I replaced Sourcemod from 1.10 to 1.11.
I suppressed unnecessary warning 217 (inconsistent indentation) in SM 1.10 by adding a parameter -w217 to ./compile.sh script. However, it does not work in SM 1.11, it looks like syntaxis was changed. But both variants ( -w217 or --warning=217 ) do not work and I'm getting this warning. I have SM 1.11 v 6863 which is the latest compiled for macOS. The worst thing is that it catches this warning in includes files and with several includes files I even can't find where is it. :( I mean the .sp file length is 600 lines, but it gives warnings for lines 1200 and 1700 So guys, what is the way now how to suppress this warning. And if you can advise how to find where it warns for complicated projects with several includes and dozens of files, I will much appreciate it. |
Re: warning suppression in SM 1.11
The warning is telling you that the code has mixed formatting, such as some lines having spaces for space and others having tab for space. You can fix each line individual or use an automated tool to reformat it for you.
I use Notepad++ with the TextFX plugin installed. That allows me to click a button to have it reformat the code for me. It works very well. Explanation of the process: https://qnaplus.com/how-to-re-indent...using-notepad/ Link to Notepad++: https://notepad-plus-plus.org/ I hope this helps... |
Re: warning suppression in SM 1.11
Quote:
By the way, can someone describe why this "formatting" issue is so important that we have the special warning for it? |
Re: warning suppression in SM 1.11
Is just a "warning" if it was that special would be an "error"
Just make the file standard only with spaces or only with tabs, As PC Gamer said you can see it better in a proper text editor (like Notepad++, View>Symbols>All Characteres) |
Re: warning suppression in SM 1.11
Quote:
I wrote Quote:
And I'm sure that much easier to suppress this warning, because it is so useless and never influences the result. |
Re: warning suppression in SM 1.11
You didn't paste the warning console output.
Usually, the file and line is mentioned in the warning. e.g: plugin.sp(100) : warning 217: inconsistent indentation (did you mix tabs and spaces?) means that at line 100 a mix was found. You said that the warning was for lines 1200 and 1700, so maybe you just need fix 2 lines which is easier than trying to fix it with a supress warning. If the plugin is 600 length, probably the issue is in the include files (that's why is hard to help without the console output), more likely you having this message for a ".inc" file. If you really want to suppress the warning maybe open an issue at sourcemod github or try help in the AM discord channel. |
Re: warning suppression in SM 1.11
Quote:
Anyway here it is: Quote:
Quote:
|
Re: warning suppression in SM 1.11
There was a bug with reported lines for error reporting that was fixed a while ago. You can find a newer compiler for macOS in this standalone bundle containing only the scripting environment. Try updating your compiler and check the error messages again. If it's still off please open an issue in the sourcepawn repo.
https://github.com/alliedmodders/sou...uns/2629456551 (needs Github login) https://nightly.link/alliedmodders/s...ripting/master (no login) |
Re: warning suppression in SM 1.11
Quote:
I found version 1.11. It does not suppress warning by -w217 or --warning=217. However, it reflects the correct file at least. Quote:
|
All times are GMT -4. The time now is 08:38. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.