Raised This Month: $ Target: $400
 0% 

Passing arrays to functions


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 01-18-2007 , 23:48   Passing arrays to functions
Reply With Quote #1

What is the correct way to do this?


Code:
    new Account[50],FreeAccount[50];
    SQL_ReadResult(Query,36,Account,49)
    SQL_ReadResult(Query,37,FreeAccount,49)
    
    SQL_FreeHandle(Query)
    
    
    check_this_query(Account[49],FreeAccount[49]);
}

public check_this_query(Account[50],FreeAccount[50]);
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 01-19-2007 , 00:03   Re: Passing arrays to functions
Reply With Quote #2

Code:
    new Account[50],FreeAccount[50];
    SQL_ReadResult(Query,36,Account,49)
    SQL_ReadResult(Query,37,FreeAccount,49)
    
    SQL_FreeHandle(Query)
    
    
    check_this_query(Account,FreeAccount);
}

public check_this_query(Account[],FreeAccount[]);
__________________
Brad is offline
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 01-19-2007 , 01:24   Re: Passing arrays to functions
Reply With Quote #3

thanks brad.. You saved the day.
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
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 22:28.


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