AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Passing arrays to functions (https://forums.alliedmods.net/showthread.php?t=50078)

SweatyBanana 01-18-2007 23:48

Passing arrays to functions
 
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]);


Brad 01-19-2007 00:03

Re: Passing arrays to functions
 
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[]);


SweatyBanana 01-19-2007 01:24

Re: Passing arrays to functions
 
thanks brad.. You saved the day.


All times are GMT -4. The time now is 22:28.

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