Creating callbacks in Sourcepawn
I'm trying to add a callback to a function I've designed which does some asynchronous actions. Using the example from Timers, I create a typedef:
HTML Code:
typeset ActionCallback { HTML Code:
public void Save(ActionCallback callback) { C:\Users\\Documents\GitHub\ttt_sourcemod\rewr ite\includes\player_actions.inc(47) : error 012: invalid function call, not a valid address C:\Users\\Documents\GitHub\ttt_sourcemod\rewr ite\includes\player_actions.inc(47) : warning 215: expression has no effect C:\Users\\Documents\GitHub\ttt_sourcemod\rewr ite\includes\player_actions.inc(47) : error 001: expected token: ";", but found ")" C:\Users\\Documents\GitHub\ttt_sourcemod\rewr ite\includes\player_actions.inc(47) : error 029: invalid expression, assumed zero C:\Users\\Documents\GitHub\ttt_sourcemod\rewr ite\includes\player_actions.inc(47) : fatal error 190: too many error messages on one line Does anyone know why my callback is not being identified as a function? |
Re: Creating callbacks in Sourcepawn
I believe you have to invoke the callback like so:
PHP Code:
|
Re: Creating callbacks in Sourcepawn
Woah, thank you so much for the information. This worked :)
|
All times are GMT -4. The time now is 12:30. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.