View Single Post
Author Message
Natsheh
Veteran Member
Join Date: Sep 2012
Old 04-02-2021 , 18:40   declaring static as global crashes the server if used in a function outside the file?
Reply With Quote #1

this following code will crash the server potentially....

PHP Code:

static blah[32] = "player";

public 
plugin_precache()
{
      
copy(blah31"test");
      
precache_model(blah);

why is that?

i know if a variabled declared as static global the variable scope will be inside the file only. but if it used such way does it means it will be used outside the file scope?
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh