AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   set_task with parameters (https://forums.alliedmods.net/showthread.php?t=24381)

GHW_Chronic 02-20-2006 19:01

set_task with parameters
 
Code:
param[0] = floatround(velocity[0]) param[1] = floatround(velocity[1]) param[2] = floatround(velocity[2]) param[3] = ent client_print(0,print_chat,"%d",param[3]) set_task(0.2,"check_velocity",0,param,4)

prints 127

Code:
public check_velocity(id,param[4]) {     client_print(0,print_chat,"%d",param[3])

prints 78 ( ALWAYS 78 )

why?

Brad 02-20-2006 19:16

Try:
Code:
public check_velocity(id,param[]) {     client_print(0,print_chat,"%d",param[3])

GHW_Chronic 02-20-2006 19:19

just did, printed 78.

GHW_Chronic 02-20-2006 20:38

o well, i found another way to do what i wanted.

BAILOPAN 02-20-2006 20:49

if the task id is 0 then params[] comes first, not id. id is not passed.

GHW_Chronic 02-20-2006 20:53

o, wow, now u tell me BAIL :-D

Thx, important information to have.


All times are GMT -4. The time now is 20:16.

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