Raised This Month: $ Target: $400
 0% 

set_task help ! (passing arguments to a function)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
turshija
Member
Join Date: Jan 2009
Old 10-30-2009 , 18:51   Re: set_task help ! (passing arguments to a function)
Reply With Quote #1

Code:
new message[192]
message = "test";

new param[1]
param[0] = message                    // this is line 72
set_task(0.1, "function", id, param, sizeof(param))
doesn't work ... :S
Error: Must be assigned to an array on line 72

and I can't put it as global variable because I maybe wont be using 0.1 delay (maybe more) so it can be possible that global variable gets changed by someone else before the function is called ...
turshija is offline
turshija
Member
Join Date: Jan 2009
Old 10-30-2009 , 18:53   Re: set_task help ! (passing arguments to a function)
Reply With Quote #2

Quote:
Originally Posted by turshija View Post
because I maybe wont be using 0.1 delay (maybe more)
I've just put an example with 0.1 sec ...
I will most likely use something around 5 seconds ...
turshija is offline
Xellath
Veteran Member
Join Date: Dec 2007
Location: Sweden
Old 10-30-2009 , 18:58   Re: set_task help ! (passing arguments to a function)
Reply With Quote #3

How many parameters do you need to pass?
__________________
Achievements API - a simple way for you to create your OWN custom achievements!
Xellath is offline
Reply



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 17:36.


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