I have a KaioKen code and it says inconsistent indentation when it is perffectly indenteted.Would someone please help me? Here is my code:
mob/verb/kaioken
Kaioken(num as num)
set category = "Attacks"
if(usr.rank >= (num * 13))
if(num == 0)
if(usr.kaioken == 1)
view(6) << "[usr] reverts from Kaioken!"
usr.underlays -= 'kaioken.dmi'
usr.kaioken = 0
usr.str -= usr.kstr
usr.def -= usr.kdef
if(usr.pl >= usr.maxpl)
usr.pl = usr.maxpl
if(usr.pl <= usr.maxpl)
usr.exp +=0
if(usr.kaioken == 0)
usr << "You arent in Kaioken!"
else
if(usr.kaioken == 1)
usr << "You are in Kaioken already!"
if(usr.kaioken == 0)
usr.pl += (num * 8552)
usr.kstr = (num / 2)
usr.kdef = (num / 2)
usr.str += (num / 2)
usr.def += (num / 2)
usr.kaioken = 1
usr.underlays += 'kaioken.dmi'
view(6) << "[usr]body glows from using using Kaioken [num]!!"
else()
view(6) << "[usr] explodes from the overwhelming power of kaioken!"
usr << "Didn't king kai warn you about that?."
usr.pl = -25
usr.Die()
The error is the elese() Some one please help me.
ID:179596
Nov 30 2001, 1:38 pm
|
|
Nov 30 2001, 1:40 pm
|
|
The indentation is very and when I say very I mean unholy like, bad I can't help you because this code is very bad.
|
Vegetto5748 wrote:
The error is the elese() Some one please help me. An "else" shouldn't be followed by parentheses. The code after it should be intented. Lummox JR |
The pain.. oh, the pain.. not only is he referring his(?) 'code'[1] as 'a code', but the indentation makes my head hurt.
I took a stab at fixing the indentation for you. Your awful style and insane (attempts at?) logic(?), however, are up to you[2]. mob/verb/Kaioken(num as num) set category = "Attacks" if(usr.rank >= (num * 13)) if(num == 0) if(usr.kaioken == 1) view(6) << "[usr] reverts from Kaioken!" usr.underlays -= 'kaioken.dmi' usr.kaioken = 0 usr.str -= usr.kstr usr.def -= usr.kdef if(usr.pl >= usr.maxpl) usr.pl = usr.maxpl if(usr.pl <= usr.maxpl) usr.exp +=0 if(usr.kaioken == 0) usr << "You arent in Kaioken!" else if(usr.kaioken == 1) usr << "You are in Kaioken already!" if(usr.kaioken == 0) usr.pl += (num * 8552) usr.kstr = (num / 2) usr.kdef = (num / 2) usr.str += (num / 2) usr.def += (num / 2) usr.kaioken = 1 usr.underlays += 'kaioken.dmi' view(6) << "[usr]body glows from using using Kaioken [num]!!" else view(6) << "[usr] explodes from the overwhelming power of kaioken!" usr << "Didn't king kai warn you about that?." usr.pl = -25 usr.Die() Oh, and as a side note. I now hate you. You are an inferior (human?) being. -- Tarmas. [1] I use 'code' in the loosest possible sense, here. [2] Or, more probably, beyond all hope. |