Raised This Month: $12 Target: $400
 3% 

declaring static as global crashes the server if used in a function outside the file?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:50.


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