[Pawn] [SOLVED] How to Use Pragma ? From #Pragma tabsize 0 - Printable Version + open.mp forum (https://forum.open.mp) -- Forum: SA-MP (https://forum.open.mp/forumdisplay.php?fid=3) --- Forum: Pawn Scripting (https://forum.open.mp/forumdisplay.php?fid=10) --- Thread: [Pawn] [SOLVED] How to Use Pragma ? From #Pragma tabsize 0 (/showthread.php?tid=2013) |
[SOLVED] How to Use Pragma ? From #Pragma tabsize 0 - PutuSuhartawan - 2021-05-14 SOLUTION: That's probably because the new scripter using the old includes as well. Please get the updated ones here: https://github.com/pawn-lang/pawn-stdlib The reason?didn't remove the warning code system is because it really cares?about the learning scripter. A lot of recommendations to make question before?the compiler success. Now sir you can find a solution. As the best developer, the basics are usually based on the strength of the solutions created. And asking for a profit before build a new resolver system. PROBLEM: I often see Pragma script designs, but I never had the knowledge to relate to this #pragma system. Is this pragma really from pawn? i just have source?#pragma warning This directive comes in two forms:
RE: [SOLVED] How to Use Pragma ? From #Pragma tabsize 0 - Y_Less - 2021-05-14 What's the question? Most of these are documented in pawn-lang.pdf. `#pragma warning` is in the SA:MP and official compilers, but have different implementations since we forked. RE: [SOLVED] How to Use Pragma ? From #Pragma tabsize 0 - Radical - 2021-05-14 (2021-05-14, 10:12 AM)PutuSuhartawan Wrote: SOLUTION: You can also: Code: #pragma warning disable 239, 217, 219, 203 RE: [SOLVED] How to Use Pragma ? From #Pragma tabsize 0 - Y_Less - 2021-05-14 The real question is why are you disabling so many warnings? They are important. RE: [SOLVED] How to Use Pragma ? From #Pragma tabsize 0 - Radical - 2021-05-14 (2021-05-14, 09:01 PM)Y_Less Wrote: The real question is why are you disabling so many warnings?? They are important. It gets a lot of warnings?when using Zeex compiler. It's a?resaon why I am?disabled some?warnings?even those important. Warnings: 239: literal array/string passed to a non-const parameter 214: possibly a "const" array RE: [SOLVED] How to Use Pragma ? From #Pragma tabsize 0 - PutuSuhartawan - 2021-05-14 (2021-05-14, 09:59 PM)Radical Wrote:(2021-05-14, 09:01 PM)Y_Less Wrote: The real question is why are you disabling so many warnings?? They are important. You are very intelligent. Respect The reason I didn't display the warning code is because it really annoys the learning scripter. A lot of complaints came out during the compiler. But never realized to find a solution. As the best developer, the basics are usually based on the strength of the solutions created. RE: [SOLVED] How to Use Pragma ? From #Pragma tabsize 0 - Y_Less - 2021-05-15 (2021-05-14, 09:59 PM)Radical Wrote:(2021-05-14, 09:01 PM)Y_Less Wrote: The real question is why are you disabling so many warnings?? They are important. That means your code is bad. Hiding issues doesn't solve them, it just means you're ignoring the bugs. I'm going to delete this topic soon, because you're advocating terrible coding practices. Like most things, we can't stop you doing them, but we can stop you spreading your terrible practices to other people and can help them learn correctly instead. RE: [SOLVED] How to Use Pragma ? From #Pragma tabsize 0 - Radical - 2021-05-15 (2021-05-15, 09:57 AM)Y_Less Wrote:(2021-05-14, 09:59 PM)Radical Wrote:(2021-05-14, 09:01 PM)Y_Less Wrote: The real question is why are you disabling so many warnings?? They are important. let me tell you before deleting this topic. If I compile the following codes with Zeex compiler: Code: SetTimer("OneSecTimer", 1000, 1); I get the following warnings: PHP Code: warning 239: literal array/string passed to a non-const parameter //SetTimer Is my code bad? There was another topic about this - https://burgershot.gg/showthread.php?tid=1556 RE: [SOLVED] How to Use Pragma ? From #Pragma tabsize 0 - Y_Less - 2021-05-15 That's probably because you're using the old includes as well. Get the updated ones here: https://github.com/pawn-lang/pawn-stdlib https://github.com/pawn-lang/samp-stdlib RE: [SOLVED] How to Use Pragma ? From #Pragma tabsize 0 - PutuSuhartawan - 2021-05-15 (2021-05-15, 02:02 PM)Y_Less Wrote: That's probably because you're using the old includes as well.? Get the updated ones here: Thanks sir. RE: [SOLVED] How to Use Pragma ? From #Pragma tabsize 0 - Pinch - 2021-05-15 And use regex to replace non-constants lol RE: [SOLVED] How to Use Pragma ? From #Pragma tabsize 0 - Y_Less - 2021-05-15 How can a regex know which parameter should be `const` and which shouldn't? RE: [SOLVED] How to Use Pragma ? From #Pragma tabsize 0 - Pinch - 2021-05-16 (2021-05-15, 08:24 PM)Y_Less Wrote: How can a regex know which parameter should be `const` and which shouldn't? In most cases (at least for me) it did the job, it's much easier to remove const than add it on thousands of places where it isn't needed.. RE: [SOLVED] How to Use Pragma ? From #Pragma tabsize 0 - PutuSuhartawan - 2021-05-16 (2021-05-16, 09:41 AM)Pinch Wrote:How to use??regex? and why regex just better than const sir?(2021-05-15, 08:24 PM)Y_Less Wrote: How can a regex know which parameter should be `const` and which shouldn't?In most cases (at least for me) it did the job, it's much easier to remove const than add it on thousands of places where it isn't needed.. RE: [SOLVED] How to Use Pragma ? From #Pragma tabsize 0 - Y_Less - 2021-05-17 (2021-05-16, 09:41 AM)Pinch Wrote:(2021-05-15, 08:24 PM)Y_Less Wrote: How can a regex know which parameter should be `const` and which shouldn't? Yeah that's fair. RE: [SOLVED] How to Use Pragma ? From #Pragma tabsize 0 - ZyZu. - 2021-06-07 This is a very useful thread, please do not delete. I had the same issue with Zeex's Compiller! Warnings fixed after updating my include files. |