New and Static Question
#1

Hello, I've got a question, as I'm not very fluent when it comes to pawn.

What would be the difference between using new; and static; ?

for instance

say I want to create a variable that will be used by almost every command (like in strtok / cmd,tmp)

so: new cmd[256], tmp[256];

I know that using strtok and cmd/tmp with 256 is way too much, but dont tell me, i've been told 201 times.

so, lets say after that, I took out new, and put:

static cmd[256], tmp[256];

I noticed when i did this, that heap file / code size stuff you see in the compiler dissepeared, as I have wanted it to, but what I didnt know, is how static is used, and if I am using it in the right way, or in the wrong way.
Reply


Messages In This Thread
New and Static Question - by Hiitch - 13.11.2009, 21:27
Re: New and Static Question - by JonyAvati - 13.11.2009, 21:30
Re: New and Static Question - by Hiitch - 13.11.2009, 21:31
Re: New and Static Question - by JonyAvati - 13.11.2009, 21:33
Re: New and Static Question - by JonyAvati - 13.11.2009, 22:10
Re: New and Static Question - by Hiitch - 14.11.2009, 00:01
Re: New and Static Question - by Donny_k - 14.11.2009, 10:27

Forum Jump:


Users browsing this thread: 4 Guest(s)