Raised This Month: $51 Target: $400
 12% 

Does reading a datapack dispose the data?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
eyal282
Veteran Member
Join Date: Aug 2011
Old 03-15-2018 , 10:32   Does reading a datapack dispose the data?
Reply With Quote #1

If I read a datapack and instead of closing it I create another data timer to the same function, will anything occur to the data?
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 03-15-2018 , 10:43   Re: Does reading a datapack dispose the data?
Reply With Quote #2

Quote:
there exists a helper function, called CreateDataTimer(), which creates a timer using a data pack handle. The handle is created and closed automatically for you.
https://wiki.alliedmods.net/Timers_(...ng)#Data_Packs
__________________
8guawong is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 03-15-2018 , 11:27   Re: Does reading a datapack dispose the data?
Reply With Quote #3

Quote:
Originally Posted by 8guawong View Post

Oh... So if I put the same data pack in another data timer inside a data timer's function, it will actually be closed? So just clone it?
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline
Fyren
FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren
Join Date: Feb 2106
Old 03-15-2018 , 11:41   Re: Does reading a datapack dispose the data?
Reply With Quote #4

When you call CreateDataTimer you should pass it an uninitialized handle and it will create a datapack for you. If you already have a datapack, just use CreateTimer and pass the handle as the data parameter.
Fyren 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 19:10.


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