14.07.2012, 11:29
The plugin may be multithreaded but pawn is not. The plugin cannot pass a value to the callback because its executing your loop and execution won't be handed back until it finishes (which of course, it wont). What you're trying to do cannot be done with the multithreading enabled. (Simply returning a value in a function like that).
The best solution off the top of my head would be to store a static or global variable for your FreeDiskID and update it as disks are used and freed. There are probably better solutions however its difficult to say without knowing the nature of the full system.
The best solution off the top of my head would be to store a static or global variable for your FreeDiskID and update it as disks are used and freed. There are probably better solutions however its difficult to say without knowing the nature of the full system.