[SOLVED] Is it set_task problem?
Hi!
My concept of set_task was quite immature...finally got them straight...thanx to all the people who helped me I am using set_task to call a function which gets the data from a field in my MySQL database and acts accordingly. This is done to all users who connect to our server. However, set_task seems to miss out on some players. I dont seem to get the logical/coding flaw that i might have. Code:
#include <amxmodx>Thanx in advance. |
Try setting it to:
Code:
|
argument type mismatch..
Sorry but your suggestion doesn't seem to help...:(
I get the following error: Code:
argument type mismatch (argument 4) |
Well .. what's the line?
|
Set_task
the line where error pops out is the line where I changed the argument for set_task on Satan's suggestion.
When I pass idd (an array) to kac_exists function thru set_task, I don't get any errors while compilation but only first person to connect is checked for valid token and rest are simply ignored. I want my plugin to wait for 60 seconds after a client has connected and then check if the token is valid or not in DB. This task should be set for all people who connect but doesnt happen so. Ne suggestions? |
I know I didn't change much but see if it works:
Code:
Don't know if the array length would have any effect on it but its worth a shot. |
thnx
thnx mate...
I got it working! I guess by just changing the array size it mattered. Why did it? Neway...now I hav one more doubt. Whenever a client joins the server, this task is set for him. But assuming a client disconnects before the time for execution is reached for the task...wat happens then? If i use remove_task in client_disconnect(id), will it remove the task set for all players or for the particualr player who disconnected? |
It would remove the task for all players since all of them are grouped under task id 0. To solve this, use a unique task id as follows:
Code:
Make sure that you don't set any other tasks with an id between 50, or whatever arbitrary number you want to start with, and 82, or 32 plus your number. |
yoohoo
thank you very much...
this idea rocked...now its working fine :) thank you akysiev, v3x and satan for all the help. |
| All times are GMT -4. The time now is 16:41. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.