Raised This Month: $ Target: $400
 0% 

[TUT] Organizing Code for Beginners


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
aexi0n
AlliedModders Donor
Join Date: Nov 2014
Location: bhop_deluxe
Old 03-07-2015 , 13:40   Re: [TUT] Organizing Code for Beginners
Reply With Quote #6

Quick Question. So my plugin is written with about 8 different files currently, and uses natives for needed information from each other. I'm trying to optimize the code completely, and make it so I have "myplugin_main", and include the other files such as "myplugin_hooks", "myplugin_commands", etc.

I've got this all working fine, but I have a question regarding which variables are usable. I know that the file "myplugin_main" will have access to all global vars from any of the other files it includes.

But in an included such as "myplugin_hooks", would I be able to use a global variable from another include file such as "myplugin_commands"

If so, is there some special way to do this? Can't seem to figure it out.
aexi0n is offline
 



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 18:34.


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