Raised This Month: $ Target: $400
 0% 

Pass multiple parameters to set_task


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 05-05-2011 , 04:37   Re: Pass multiple parameters to set_task
Reply With Quote #4

Because taskid is the task's ID, in fysiks' example 12345 is the task id.

For strings, you can make an array containing all kinds of stuff.
PHP Code:
new data[33]

get_user_name(iddata31/* a string */

data[32] = 53 /* a number */

set_task(1.0"function"12345datasizeof data
PHP Code:
public function(data[], taskid)
{
    new 
szName[32]
    
copy(szNamecharsmax(szName), data/* will copy the first 32 chars of data */

    
new iVal data[32/* your integer */

Not tested, I could be off on the array indexes :/

Hmm, but I belive you can make that better with hacked enums... I'll leave that for others that have experience with these.
__________________

Last edited by Hunter-Digital; 05-05-2011 at 12:26. Reason: fixed func param order
Hunter-Digital is offline
 



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 04:29.


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