2021-05-16, 07:41 AM
2021-05-15: y_remote
This very simple library just wraps CallRemoteFunction, to generate all the specifiers for you and check that the parameters are correct at compile-time.? This code compiles but doesn't work:
This code gives an error:
That's very useful for spotting bugs early.
This very simple library just wraps CallRemoteFunction, to generate all the specifiers for you and check that the parameters are correct at compile-time.? This code compiles but doesn't work:
Quote:
// FS
forward FunctionInFilterscript(a, b[]);
public FunctionInFilterscript(a, b[])
{
}
// GM
main()
{
____// Incorrect parameters, but no warning.
____CallRemoteFunction("FunctionInFilterscript", "ii", 0, 42);
____// Name spelt incorrectly, but no warning.
____CallRemoteFunction("FunctionInFilterScript", "is", 0, "hello");
}
This code gives an error:
Quote:
// FS
remote FunctionInFilterscript(a, string:b[])
{
}
// GM
remote FunctionInFilterscript(a, string:b[]);
main()
{
____// Type mismatch error.
____call FunctionInFilterscript(0, 42);
____// Undefined symbol error.
____call FunctionInFilterScript(0, "hello");
}
That's very useful for spotting bugs early.