question about functions
I have a question about calling a function from another function.
I don't know how i can explain it well, so i'll make an example. Code:
public client_connect(id)is it like: - client connects - client_connect is called - client_connect calls check_something and waits - check_something does something - client_connect prints the msg or like this: - client connects - client_connect is called - client_connect calls check_something and prints the message - check_something does something This may be a stupid question, but i need the answer for a plugin i'm making. |
Re: question about functions
The first scenario is correct.
check_something() is called and completed before client_print() will be called. Meaning everything in check_something() is executed before client_print(). |
Re: question about functions
Thanks, that's all i needed.
|
Re: question about functions
Quote:
EDIT: Oh, hi fysiks. |
Re: question about functions
Quote:
EDIT: Let's say i return PLUGIN_HANDLED in public checksomething(id). Will client_connect still continue then? and if so, is there a way to stop that? |
Re: question about functions
Quote:
To stop that, you could do something like this. Code:
|
Re: question about functions
awesome, Thanks guys
|
Re: question about functions
Quote:
|
Re: question about functions
if i have a while loop that i break in check_something(id), can i do something like this?
Code:
if(check_something(id) == break) |
Re: question about functions
Code:
|
| All times are GMT -4. The time now is 14:45. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.