Reply to This symbol
If you don't have an account, just leave the password field blank.
In this line:
if (hurt_thing(i, (spr[h].strength / 2) + ((rand() % ((spr[h].strength+1) / 2))+1), 0) > 0)
...What does that symbol "%"?
It is really complicated to read that line, so I have simpified it. Here:
----
StrenghtDiv2 = spr[h].strength / 2;
Random = rand();
StrenghtPlus1Div2 = (spr[h].strength + 1) /2;
if (hurt_thing(i, StrengthDiv2 + ((Random % StrengthPlus1Div2) +1), 0) > 0)
----
What operation produces (Random % StrengthPlus1Div2)?
Also, please correct me on this if it is incorrect:
/ means division
// means comment until end of line
/* means the start of a commented block
*/ means end of commented block.
(A || B) means OR, like (10 or 01) = 11
(A && B) means AND, like 11 and 00 = 00
(!A) means NOT A
The strange thing is that I saw (A & B) and (A | B), with only single symbol each.
So, in that way, these symbols means something different?
if (hurt_thing(i, (spr[h].strength / 2) + ((rand() % ((spr[h].strength+1) / 2))+1), 0) > 0)
...What does that symbol "%"?
It is really complicated to read that line, so I have simpified it. Here:
----
StrenghtDiv2 = spr[h].strength / 2;
Random = rand();
StrenghtPlus1Div2 = (spr[h].strength + 1) /2;
if (hurt_thing(i, StrengthDiv2 + ((Random % StrengthPlus1Div2) +1), 0) > 0)
----
What operation produces (Random % StrengthPlus1Div2)?
Also, please correct me on this if it is incorrect:
/ means division
// means comment until end of line
/* means the start of a commented block
*/ means end of commented block.
(A || B) means OR, like (10 or 01) = 11
(A && B) means AND, like 11 and 00 = 00
(!A) means NOT A
The strange thing is that I saw (A & B) and (A | B), with only single symbol each.
So, in that way, these symbols means something different?