SA-MP Forums Archive
Question about functions in plugins.... - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Plugin Development (https://sampforum.blast.hk/forumdisplay.php?fid=18)
+--- Thread: Question about functions in plugins.... (/showthread.php?tid=86548)



Question about functions in plugins.... - XPlatform - 14.07.2009

Hi,

I'm having a slight problem with a project I'm working on. At the moment, I have many functions in the plugin that are forwarded to the PAWN so I can use them in the script.

All of these functions return an int. I have another function that must be void, but whenever I remove the return as in this example:
Code:
static cell AMX_NATIVE_CALL n_myfunc(AMX* amx, cell* params)
{
	dostuff();
	return 1;
}
so that it looks like this:

Code:
static cell AMX_NATIVE_CALL n_myfunc(AMX* amx, cell* params)
{
	dostuff();
}
It doesn't compile.

If anyone knows how to make a void, or other type of function in the plugin, so that it can be used in PAWN, please let me know.

Thanks,
CodeMatrix


Re: Question about functions in plugins.... - XPlatform - 14.07.2009

ok, thanks