AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Solved statics (dumb question) (https://forums.alliedmods.net/showthread.php?t=339475)

kww 09-12-2022 09:55

statics (dumb question)
 
Hi. If I will create variables like this:
PHP Code:

static eData[eModelTable], szModel[32]; 

then both vars will be static, right?
Sorry for dumb question/

EFFx 09-12-2022 20:20

Re: statics (dumb question)
 
Yes. Will save the information you set until either a new one be given or you reset it.

kww 09-13-2022 00:08

Re: statics (dumb question)
 
Quote:

Originally Posted by EFFx (Post 2788690)
Yes. Will save the information you set until either a new one be given or you reset it.

So I can init all statics in 1 line? Ty

EFFx 09-13-2022 00:31

Re: statics (dumb question)
 
Yes.

PHP Code:

static abcd// they all will be static 

PHP Code:

new abcd// static no longer, will start everytime with 0 



All times are GMT -4. The time now is 15:40.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.