19.03.2011, 07:16
I made this script:
and this include:
What is wrong? it wont output anything.
pawn Код:
#include <a_samp>
#include <math>
main()
{
print("\n----------------------------------");
print(" testcrap");
print("----------------------------------\n");
}
public OnFilterScriptInit()
{
new num1 = subtract(50, 45);
new num2 = add(25, 22);
new num3 = multiply(22, 85);
new num4 = divide(200, 5);
printf("%i", num1);
printf("%i", num2);
printf("%i", num3);
printf("%i", num4);
}
pawn Код:
#if defined _math
#endinput
#endif
#define _math
#pragma library math
subtract(bnum, snum)
{
new num1 = bnum - snum;
}
add(bnum, snum)
{
new num2 = bnum + snum;
}
multiply(bnum, snum)
{
new num3 = bnum * snum;
}
divide(bnum, snum)
{
new num4 = bnum / snum;
}
native subtract(bnum, snum);
native add(bnum, snum);
native multiply(bnum, snum);
native divide(bnum, snum);