proc
skillcheck()
if(usr:ap >=30)
if(usr = mob/knight)
list/skills:(/battle/battleskill/bighit,/battle/battleskill/flamestrike)
if(usr = /mob/summoner)
list/skills:(/battle/battleskill/zap,/battle/battleskill/bang,/battle/battleskill/heal,/battle/battleskill/earthen)
return()
Problem description:
Basically, adding skills based on AP stat. The way I am doing it, it updates the list this way but. The main thing I want is. If the users AP stat is above or equal equal to 30, and he is a knight, add Flamestrike
If the user is a Summoner, add Earthen
I am getting Inconsistent Indentation Errors on the list/skills ones, (Both) and on the return.
So you know, they are properly tabbed, they got pushed back in the DM code for some odd reason.
Basically, it is
proc
skillcheck()
if
if
list
if
list
return()
What was before it and it
knight
icon = 'player_soldier.dmi'
maxhp = 150
maxmp = 50
level = 1
exp = 0
mdefence = 5
pdefence = 5
def = 5
expgive = 15
expneeded = 200
str = 40
def = 30
int = 5
agi = 8
lck = 10
ap = 3
skills = newlist(/battle/battleskill/bighit) // skills included
proc
skillcheck()
if(usr:ap >=30)
if(usr = mob/knight)
list/skills:(/battle/battleskill/bighit,/battle/battleskill/flamestrike)
if(usr = /mob/summoner)
list/skills:(/battle/battleskill/zap,/battle/battleskill/bang,/battle/battleskill/heal,/battle/battleskill/earthen)
return()
I noticed you also only have one = in your second if statement. Remember that == tests for something, = sets something equal to something else.
I'd recommend you combine them.
if(usr:ap >=30 && user == mob/knight)
I don't really know what's going on with those colons after your skills lists. You're getting inconsistent indentation errors because your indentation is... inconsistent. It doesn't make any sense. Particularly that last return is too far to the right. It needs to be just under list/skills.
Keep in mind, these are just syntax errors I'm spotting at the moment. You'll want to fix those regardless of what design flaws you have. Also, you might want to reconsider using usr in a proc. It's not as reliable as you might think it is. And if you want to stop using colons all over the place (which I highly recommend you do, otherwise you're going to get a slew of runtime errors eventually), just typecast things properly.
var/mob/knight/k
instead of
var/mob/k
if you plan on accessing knight specific elements like their flamestrike proc or whatever.