how do I make it so it's an if statement with an "and" like:
if (usr.exp > 9) AND (usr.level=0)
usr.level += 1
usr << "You have gained a level!"
ID:178631
Apr 22 2002, 5:45 pm
|
|
Apr 22 2002, 5:48 pm
|
|
Look up && in the reference.
|
In response to Nadrew
|
|
I put it in and it still won't work right:
if (usr.exp > 9 && usr.level = 0) usr.level += 1 usr << "You have gained a level!" usr.HP +=5 usr.MAX_HP +=5 usr.strength +=1 |
In response to Likwiddraino000
|
|
Likwiddraino000 wrote:
I put it in and it still won't work right: In if statements you have to use boolean expressions. Look up boolean expressions. |
In response to BurningIce
|
|
it doesn't say anything about em
|
In response to Likwiddraino000
|
|
Likwiddraino000 wrote:
I put it in and it still won't work right: if (usr.exp > 9 && usr.level == 0) = means an assignment == means a comparison |
In response to Skysaw
|
|
if (src.exp > 9 && src.level == 0) -Kappa the Imp |
In response to Kappa the Imp
|
|
Kappa the Imp wrote:
> if (src.exp > 9 && src.level == 0) -Kappa the Imp Already answered in this thread, and already acknowledged. |