Raised This Month: $ Target: $400
 0% 

Problem with passing an array by set_task


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
[PUPPETS] Scooter
Member
Join Date: May 2009
Old 12-25-2009 , 14:52   Problem with passing an array by set_task
Reply With Quote #1

Hello,
I've got a problem with passing a Steam-ID from one function to another one by set_task. Here's my code:

Code:
public check_manual(id, level, cid)
{
 ...
 new header_connect[4]
 
 header_connect[0] = id 
 format(header_connect[1], 31 ,"%s", player_steam)
 // Point1
 console_print(id, header_connect[1]) 
 header_connect[2] = player_exists 
 header_connect[3] = player_id 
 
 set_task(1.0, "connect_web", id, header_connect, 4)
 ...
}
 
public connect_web(arg[])
{
... 
 //Point2
 console_print(id,arg[1])
...
}
At Point1 I get (as it should be):
STEAM_0:0:1234

But in connect_web at Point2, it's reduced to:
S_M

If I replace 4 in set_task by 80, I get:
S_MAM_0:0:1234

Why do I get S_MAM.. instead of STEAM and why do I have to increase array size in set_task?

Thanks for your help,
Scooter
[PUPPETS] Scooter is offline
 



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


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