19.11.2012, 11:13
An example:
Let's say that something is wrong with that code. You can use print/printf to check if it is called and which are the results.
pawn Код:
main( )
{
new
a = 20,
b = 21,
c
;
if( a > b ) c = a + b;
if( a < b ) c = a - b;
}
pawn Код:
// An example of it
main( )
{
new
a = 20,
b = 21,
c
;
printf( "a = %d\nb = %d", a, b );
if( a > b )
{
printf( "if( %d > %d ) is true!", a, b );
c = a + b;
printf( "c is now %d", c );
}
if( a < b )
{
printf( "if( %d < %d ) is true!", a, b );
c = a + b;
printf( "c is now %d", c );
}
}