Raised This Month: $ Target: $400
 0% 

Read all public


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Diegorkable
Veteran Member
Join Date: Jun 2011
Old 07-21-2011 , 07:42   Read all public
Reply With Quote #1

PHP Code:
public test1()
{
       
// part 1 of code

       
test2()

       
// part 2 of code
}

public 
test2()
{
       
// some code

MY question is, will part 2 of code in public test1 be read?
Diegorkable is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-21-2011 , 07:44   Re: Read all public
Reply With Quote #2

Yes. Something you could test yourself easily.
__________________
Arkshine is offline
Diegorkable
Veteran Member
Join Date: Jun 2011
Old 07-21-2011 , 08:05   Re: Read all public
Reply With Quote #3

And what if there's a recoursive set_task(1.0, "test2") in public test2, will it (part 2 of code of public test1) still be read?
Diegorkable is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-21-2011 , 08:09   Re: Read all public
Reply With Quote #4

set_task don't pause the server, it's a timer which will execute your function at t time. So yes, part2 will be read.
__________________
Arkshine is offline
Reply



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 00:46.


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