Raised This Month: $32 Target: $400
 8% 

push _:handle to another function?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Podunk
Senior Member
Join Date: Nov 2005
Location: Florida
Old 09-25-2007 , 19:57   push _:handle to another function?
Reply With Quote #1

Can I pass the query handle with callfunc_push_int to another function and still have the handle valid??

Code:
static eat_stacks(){
    //server_print("LS:%d, LF:%d;  NS:%d, NF:%d;  HS:%d, HF:%d;  ",sspl_spoon,sspl_fork,sspn_spoon,sspn_fork,ssph_spoon,ssph_fork);
    for (new PRIORITY:i=HIGH;_:i<_:LOWP+1;_:i++)
    {
        get_sql(i);
        while(plate_sql[0])
        {
            new Handle:qh = query(plate_sql,plate_sqltype,i);
            switch(type){
                case EXECUT:
                {
                    if (plate_callback > 0)
                    {
                        //do the call
                        new callworked = callfunc_begin_i  ( plate_callback );
                        if (callworked == 1)
                        {
                            callfunc_push_int(_:qh);
                            callfunc_end ( );
                        }
                    }
                }
                case SIMPLE:
                {
                    //nothing to do
                }
            }
            //complement chef
            i=HIGH;
            //clean plate
            plate_sql = "";
            //get seconds
            get_sql(i);
        }
    }
}
__________________
Check out my website at http://matthewmiller.info
Podunk is offline
Send a message via MSN to Podunk
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 09-25-2007 , 22:05   Re: push _:handle to another function?
Reply With Quote #2

As long as you type cast back to a Handle: it will work.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
Podunk
Senior Member
Join Date: Nov 2005
Location: Florida
Old 09-26-2007 , 21:23   Re: push _:handle to another function?
Reply With Quote #3

thanks!

+karma
__________________
Check out my website at http://matthewmiller.info
Podunk is offline
Send a message via MSN to Podunk
Reply


Thread Tools
Display Modes

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 07:19.


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