View Single Post
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 07-01-2018 , 09:55   Re: Creating callbacks in Sourcepawn
Reply With Quote #2

I believe you have to invoke the callback like so:

PHP Code:
public void Save(ActionCallback callback) {
    
float test[2];

    
test[0] = 2.0;
    
test[1] = 1.0;

    
Call_StartFunction(INVALID_HANDLEcallback);
    
Call_PushArray(testsizeof(test));
    
Call_Finish();

INVALID_HANDLE indicates the callback is in the current plugin.
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami is offline