sourcepawn
sourcepawn copied to clipboard
error 100: function prototypes do not match
typeset T
{
function void (int a);
function void (int a, int b);
}
native void N(T t);
public void OnPluginStart()
{
bool b = true;
N(b ? A : B); // error 100: function prototypes do not match
}
public void A(int a)
{
}
public void B(int a, int b)
{
}
This is inconvenient and you are forced to do:
if (b) {
N(B);
} else {
N(A);
}