ID:139288
 
Code:
stamina_skill_up()
if stamina_exp == Max_stamina_exp
stamina_exp = 0
Max_stamina_exp+=rand(5,10)
Max_stamina+=rand(10-15)
usr << "Your stamina has improved!"


Problem description:

naruto game1.dm:77:error: missing condition
problem is with the if statement any chance some1 can tell me what im missing?
You're missing the parentheses, AND your indentation is incorrect. You want to use the tab button to indent code, not the spacebar.


This is the correct way to use if():
if(stamina_exp == Max_stamina_exp)


In response to Duelmaster409
ok fixed the indentation / brackets now i get
if (stamina_exp == Max_stamina_exp)
stamina_exp = 0
Max_stamina_exp+=rand(5,10)
Max_stamina+=rand(10-15)
usr << "Your stamina has improved!"

naruto game1.dm:77:error: ==: bad variable definition
naruto game1.dm:77:error: if: invalid variable name: reserved word
In response to Harth01
You can't have the extra space between if and the first parenthesis.
In response to Harth01
Executed code (as in, anything that is not simply defining data) has to go in a procedure.

Additionally, when posting about a problem, you need to give more context. Specifically, you have:

mob
var
if(blah)
blah blah blah


That is something which would be useful to know for diagnosing your problem.
In response to Duelmaster409
This is false. If you have a suspicion about an error, but aren't sure, take two seconds to try compiling it yourself.