ID:143809
 
Code:


Problem description:

b/proc/Level()

if(src.exp >= src.tnl)

src.exp -= src.tnl
src.level ++
power_gain = round(rand(1000,50000) + (src.power_bonus + (src.level / 1.5)))
var/ki_gain = round(rand(1000,50000) + (src.ki_bonus + (src.level / 1.5)))
var/str_gain = round(rand(1000,50000) + (src.strength_bonus + (src.level / 8)))
var/def_gain = round(rand(1000,50000) + (src.defence_bonus + (src.level / 8)))
var/spd_gain = round(rand(1000,50000) + (src.speed_bonus + (src.level / 8)))

src << "
\white -------------------------
"
src << "
« Level Up »
"
src << "
Power +[power_gain]
"
src << "
Ki +[ki_gain]
"
if(str
"
Strength, +[str_gain]
"
if(def_
"
Defence +[def_gain]
"
if(spd_
"
Speed +[spd_gain]
"
src << "
\white -------------------------
"

src.powerlevel_max += power_gain
src.ki_max += ki_gain

Say am missing comma or parenthesis no idea
        if(str
> "<center><font color = white>Strength, +[str_gain]</center>"
> if(def_
> "<center><font color = white>Defence +[def_gain]</center>"
> if(spd_
> "<center><font color = white>Speed +[spd_gain]</center>"


??
In response to Zythyr
if(str
"<center><font color = white>Strength, +[str_gain]</center>"
if(def_
"<center><font color = white>Defence +[def_gain]</center>"
if(spd_
"<center><font color = white>Speed +[spd_gain]</center>"

It says that its missing a comma or parenthesis ont those codes but i dont know why or here to put da comma or parenthesis
In response to Heavensrath
b/proc/Level()

if(src.exp >= src.tnl)

src.exp -= src.tnl
src.level ++
var/power_gain = round(rand(1000,50000) + (src.power_bonus + (src.level / 1.5)))
var/ki_gain = round(rand(1000,50000) + (src.ki_bonus + (src.level / 1.5)))
var/str_gain = round(rand(1000,50000) + (src.strength_bonus + (src.level / 8)))
var/def_gain = round(rand(1000,50000) + (src.defence_bonus + (src.level / 8)))
var/spd_gain = round(rand(1000,50000) + (src.speed_bonus + (src.level / 8)))

src << "<center>\white -------------------------</center>"
src << "<center>« Level Up »</center>"
src << "<center>Power +[power_gain]</center>"
src << "<center>Ki +[ki_gain]</center>"
src << "<center>Strength, +[str_gain]</center>"
src << "<center>Defence +[def_gain]</center>"
src << "<center>Speed +[spd_gain]</center>"
src << "<center>\white -------------------------</center>"

src.powerlevel_max += power_gain
src.ki_max += ki_gain
In response to Zythyr
Well if you actually learned to code instead of just ripping it; you'd have the faintest idea on what to do, because that error is the easiest thing to correct.
In response to LucifersHellion
LucifersHellion wrote:
Well if you actually learned to code instead of just ripping it; you'd have the faintest idea on what to do, because that error is the easiest thing to correct.

No, Inconsistent Indentation is the easiest to fix.

"missing comma ',' or right-paren ')'" means that you have put two values in an without an operator in the middle (so it'll assume it's a param setup) for example:
if(usr src)
The compiler will think you meant
if(usr, src)
. Missing paren means you forgot to close the statement. For example:
if(src == usr
Notice the lack of right parenthesis? That's the error you're receiving.

Along with compiler errors, somewhere down the road you'll run into runtime errors. I suggest you read this article so you understand what's going on, before you drop what you're doing and ask for help.
In response to Tiberath
Tiberath wrote:
No, Inconsistent Indentation is the easiest to fix.

Either or, they're pretty much REALLY simple to fix. They're also Self-Explanatory. At least.. to me..
In response to LucifersHellion
LucifersHellion wrote:
Tiberath wrote:
No, Inconsistent Indentation is the easiest to fix.

Either or, they're pretty much REALLY simple to fix. They're also Self-Explanatory. At least.. to me..

Not everyone grasps the same concepts at the same time. Hell, in my year twelve physics class, I was the only one who actually knew what parenthesis were. Everyone thought they were just called brackets.

Be mindful that people learn at different rates, and don't always learn the same thing that everyone else does.