How can I make a user error appear in the compiler? (#error)
#1

in pawn-lang.pdf I read that #error is used for displaying user errors when compiling.

I tried to use this in one of my plugins, but I seem to need some help with this:

Code:
stock F_SetMenuTitleBoxColor(menuid, color)
{
	if(MenuInfo[menuid][UsedMenu] == true)
	{
		TextDrawBoxColor(MenuInfo[menuid][T_Title], color);
		return 1;
	}
	else
	{
		#error menuid doesn't exist.
		return 0;
	}
}
this is how I tried to use it, but the error just always appears.
can anyone please give me an example of how I can do this? thanks in advance.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)