21.07.2009, 00:28
I can't seem to get this to work correctly,
[code=pawn]#include <a_samp>
stock Somethingperator--(Somethingper)
return Something_per - 1);
stock Somethingperator++(Somethingper)
return Something_per + 1);
public OnFilterScriptInit()
{
new Something:a = Something:5, Something:b = Something:5;
a++;
b--;
printf("a = %i, b = %i", _:a, _:b);
return 1;
}[/code]
gives
but if I just have the decrement operator and not the increment operator it gives the expected value. Am I doing something wrong or is this a compiler problem?
[code=pawn]#include <a_samp>
stock Somethingperator--(Somethingper)
return Something_per - 1);
stock Somethingperator++(Somethingper)
return Something_per + 1);
public OnFilterScriptInit()
{
new Something:a = Something:5, Something:b = Something:5;
a++;
b--;
printf("a = %i, b = %i", _:a, _:b);
return 1;
}[/code]
gives
Quote:
a = 6, b = 6 |