Pass multiple parameters to set_task
If I had some function like this:
PHP Code:
PHP Code:
|
Re: Pass multiple parameters to set_task
PHP Code:
PHP Code:
|
Re: Pass multiple parameters to set_task
Thanks for your reply. However I was wondering if this is possible when one of the needed parameters is a string..
In your example, why is task_id an argument of "function" ? |
Re: Pass multiple parameters to set_task
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:
PHP Code:
Hmm, but I belive you can make that better with hacked enums... I'll leave that for others that have experience with these. |
Re: Pass multiple parameters to set_task
You can pack anything into an array and pass it to a function via set_task as long as you keep the data organized so it can be retrieved in the called function. The easiest way to do this is with an enum to create a 'hacked' structure. Also make sure your called function has parameters in the correct order; the data/array is first then task-id.
PHP Code:
Code:
TaskID=12345 "1" "bugsy" "STEAM_0:0:123456" "100" "55.250000" [12,34,56] |
Re: Pass multiple parameters to set_task
Thanks Bugsy! Great example :)
|
| All times are GMT -4. The time now is 04:29. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.