Set_task with params?
First of all, I found many threads about the same question, but no one satisfied me entirely..
I only want to change this function to a task sendMessage (totalPlayers, cont, color, teamName, player) Something like this: set_task (0.1, "sendMessage", id, "totalPlayers, cont, color, teamName, player") This way it compiles with no errors, but doesn't work either.. |
Re: Set_task with params?
You can only pass one parameter
|
Re: Set_task with params?
You can do stuff like this:
Code:
|
Re: Set_task with params?
Thanks M249-M4A1, I knew I could pass only one parameter. But how can I pass all of them?
Drak, I tried this too... but how do I do if values are strings? args[0] = teamName copy (args[0], teamName) ? |
Re: Set_task with params?
It really depends on what each variable is. Are they arrays?
Please specify. |
Re: Set_task with params?
totalPlayers : int
cont: int color: array (string?) teamName: array player: int |
Re: Set_task with params?
nope, limitation of the set task, but you can format it into one string and break it down after its called
|
Re: Set_task with params?
And... How do I do that?
|
Re: Set_task with params?
Hum try this. I don't know your color format so I've assumed something like "255255255".
Code:
|
Re: Set_task with params?
I'll try that... Thanks!
|
| All times are GMT -4. The time now is 16:11. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.