#pragma dynamic in 0.3z
#1

Hi there,

Not sure if this is the right section, so please move this post if its wrong.


Basically, in my 0.3x Script, I increased the memory cells for the stack using "#pragma dynamic 8192" effectivly doubling it, but when I compile the script in 0.3z the memory warnings re-appear.

Has #pragma dynamic been removed / renamed in 0.3z?


Thanks for any help,

Grim.
Reply
#2

The server includes are a bit larger with the new natives, it makes your script have more stack, keep increasing.
Reply
#3

Thats about the compiler. And the pawn compiler for samp hasnt been updated for years.
Reply
#4

Since found the issue, In my old a_samp include, i had re-defined MAX_PLAYERS to 32, and when i copied the 0.3z a_samp it was back at 500

Thanks for the help tho guys
Reply
#5

see you pawn.cfg
Reply
#6

Quote:
Originally Posted by Grimrandomer
Посмотреть сообщение
Since found the issue, In my old a_samp include, i had re-defined MAX_PLAYERS to 32, and when i copied the 0.3z a_samp it was back at 500

Thanks for the help tho guys
So you don't have this issue again in the future, you should never edit includes, as your changes will be lost. Do this:

pawn Код:
#include <a_samp>
#undef MAX_PLAYERS
#define MAX_PLAYERS 32
Reply
#7

What's the use of doing the above code? Couldn't you just edit it via server.cfg?
Reply
#8

Quote:
Originally Posted by Luis-
Посмотреть сообщение
What's the use of doing the above code? Couldn't you just edit it via server.cfg?
MAX_PLAYERS is the value from a_samp.inc file, which is located in yout pawno/include folder. MAX_PLAYERS value is mostly used to loop through all the players (max players of SA-MP that can handle) which is: 500 (or 1000 in Linux). Instead of doing loop this way, I rather using foreach created by ******.
Reply
#9

just in case you want to prevent the warning when compiling other scripts which dont include yout MAX_PLAYERS re-definition:
add
Код:
-S8192
in your compiler run options.
Reply
#10

Ah, didn't think of that. Thanks for explaining.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)