Raised This Month: $ Target: $400
 0% 

Push Function to ArrayList..


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
client21
Senior Member
Join Date: Apr 2013
Old 12-04-2020 , 10:02   Push Function to ArrayList..
Reply With Quote #1

PHP Code:
public void OnPluginStart()
{
    
ArrayList a = new ArrayList();
    Function 
GetFunctionByName(GetMyHandle(), "OnPluginStart");

    
// error 130: cannot coerce functions to values
    
a.Push(f); 

    
// warning 237: coercing functions to and from primitives is unsupported
    // and will be removed in the future
    
a.Push(view_as<int>(f));

Are you seriously? Is that really all I can do? :

PHP Code:
public void OnPluginStart()
{
    
ArrayList a = new ArrayList();
    Function 
GetFunctionByName(GetMyHandle(), "OnPluginStart");
    
DataPack pack = new DataPack();
    
pack.WriteFunction(f);
    
a.Push(pack);

Very sad
client21 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 17:14.


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