ID:145532
 
Code:
      if(src.mob.race=="Human")
src.mob.lvl = 1 // WTF this line keeps indenting!?
src.mob.hp = 10
src.mob.hpmax = 10
src.mob.mp = 10
src.mob.mpmax = 10
src.mob.agi = 5
src.mob.wis = 6
src.mob.str = 8
if(src.mob.class=="Warrior")
src.mob.hp += 30
src.mob.hpmax += 30
src.mob.mp -= 5
src.mob.mpmax -= 5
src.mob.agi -= 1
src.mob.wis -= 3
src.mob.str += 4
if(src.mob.class=="Mage")
src.mob.hp -= 2
src.mob.hpmax -= 2
src.mob.mp += 5
src.mob.mpmax += 5
src.mob.agi += 1
src.mob.wis += 5
src.mob.str -= 4
if(src.mob.class=="Scout")
usr <<"you Recieve no Bonuses!"
/* if(src.mob.race=="Neko-jin")
usr <<""*/


Problem description:

usaully i know what im doing right.. but something in my script is causing the script under it to create indentiion errors.. ive tried everything.. i dont know how to make them go away. it makes me made cause the if statements were my last chance of creating the rpg. The procs odnt work. Ill have to ask my friend who made the login.
        if(src.mob.race=="Human")
src.mob.lvl = 1 // WTF this line keeps indenting!?
src.mob.hp = 10
src.mob.hpmax = 10
src.mob.mp = 10
src.mob.mpmax = 10
src.mob.agi = 5
src.mob.wis = 6
src.mob.str = 8
if(src.mob.class=="Warrior")
src.mob.hp += 30
src.mob.hpmax += 30
src.mob.mp -= 5
src.mob.mpmax -= 5
src.mob.agi -= 1
src.mob.wis -= 3
src.mob.str += 4
if(src.mob.class=="Mage")
src.mob.hp -= 2
src.mob.hpmax -= 2
src.mob.mp += 5
src.mob.mpmax += 5
src.mob.agi += 1
src.mob.wis += 5
src.mob.str -= 4
if(src.mob.class=="Scout")
usr <<"you Recieve no Bonuses!"
/* if(src.mob.race=="Neko-jin")
usr <<""*/



See if that works for you...
In response to Demetrium Productions
That won't do hell, since those are CLASSES compound to the race.
Ontopic, Neko, try giving us some lines BEFORE that code and be sure to use tabs (alt+t), not spaces.
In response to Mysame
Mysame wrote:
That won't do hell, since those are CLASSES compound to the race.
Ontopic, Neko, try giving us some lines BEFORE that code and be sure to use tabs (alt+t), not spaces.

heres the entire login.dm .. everything works fine untill i type in those if's.. its like its screwing it all up. i did a no tab vervsion of it also it still errored/

client
New()
src.mob = new/mob/newbie
if(fexists("Saves/[src.ckey].sav"))
var/savefile/D = new("Saves/[src.ckey].sav")
src.mob.Read(D)
src.mob.x = src.mob.savedx
src.mob.y = src.mob.savedy
src.mob.z = src.mob.savedz
world << "[src.mob] has joined!"
// ppl +=1
return
else
world << "[src] is creating a char!"
// ppl +=1
src.mob.gender = input(src,"Select your gender!","Gender") in list(MALE,FEMALE)
src.mob.icon='enemy.dmi'
src.mob.icon_state= gender
src.mob.race = input(src, "Select your Race!","Race") in list("Human","Neko-jin","Kitsune-jin")
if(src.mob.race=="Human")
src.mob.class = input(src, "Choose Class!","Class") in list("Warrior","Mage","Scout","Archer")
if(src.mob.race=="Neko-jin")
src.mob.class = input(src, "Choose Class!","Class") in list("Warrior","Mage","Scout","Archer")
if(src.mob.race=="Kitsune-jin")
src.mob.class = input(src, "Choose Class!","Class") in list("Warrior","Mage","Scout","Archer")
// src.mob.StatX()
/* if(src.mob.race=="Human")
src.mob.lvl = 1
src.mob.hp = 10
src.mob.hpmax = 10
src.mob.mp = 10
src.mob.mpmax = 10
src.mob.agi = 5
src.mob.wis = 6
src.mob.str = 8
if(src.mob.class=="Warrior")
src.mob.hp += 30
src.mob.hpmax += 30
src.mob.mp -= 5
src.mob.mpmax -= 5
src.mob.agi -= 1
src.mob.wis -= 3
src.mob.str += 4
if(src.mob.class=="Mage")
src.mob.hp -= 2
src.mob.hpmax -= 2
src.mob.mp += 5
src.mob.mpmax += 5
src.mob.agi += 1
src.mob.wis += 5
src.mob.str -= 4*/

//
//
//
//src.mob.StatX(mob)
//
//src.mob.class = input(src, "Choose Class!","Class") in list("Warrior","Mage","Scout","Archer")


// if(moonrock=="cool")
// del()
// if(usr.race=="Human")
// StatX()
// StatX()
// src.mob.class = input(src, "Select Your Class!","Class" in list("WARRIOR","MAGE")

name
var/n = input(src,"What would you like to be called?") as text|null
if(!n)
n = src.key
n = html_encode(n)
var/t
for(t in profanitylist)
if(findtext(t,n) && t <> null)
src << "That name contains unnacceptable words. Please try again."
goto name
var/g = 1
var/l = lentext(n)
for(g=1,g <= l, g++)
var/f = copytext(n,g,g+1)
if(findtext(alphanumer,f))
continue
else
src << "Names may only contain the characters 1-9 and the letters of the alphabet. Please modify the name."
goto name

switch(alert(src,"Is [n] ok?","Name","Yes","No"))
if("No")
goto name
src.mob.name = n
mob.loc=locate(1,1,1)
// src.mob.StatX()

Del()
var/savefile/N = new("Saves/[src.ckey].sav")
if(src.mob.nosav)
fdel("Saves/[src.ckey].sav")
goto XY
src.mob.savedx = src.mob.x
src.mob.savedy = src.mob.y
src.mob.savedz = src.mob.z
src.mob.Write(N)
XY
ppl -=1
world << "[src] has just left!"
del src.mob
// del(src)
// ppl -=1
mob/var/nosav
mob/var/muted

mob/proc/checktxt(text)
var/g = 1
if(findtext(text,"byond:"))
src.muted = 1
world << "<FONT COLOR=RED><B>[src] has been muted for byond linking!"
return 1
var/l = lentext(text)
for(g=1,g <= l, g++)
var/f = copytext(text,g,g+1)
if(findtext(alphanumer2,f))
continue
else
src << "Your text contains illegal characters. Please rephrase it."
return 1
return 0

/* verb/delfile(client/mob/m in world)
if(!m.client)
return
m.nosav = 1
del m.client

if(src.checktxt(c)) //Note that c is your chat text variable, whatever it may be
return

*/


mob/proc/StatX()
if(usr.race=="Human")
lvl = 1
hp = 10
hpmax = 10
mp = 10
mpmax = 10
agi = 5
wis = 6
str = 8
if(usr.class=="Warrior")
hp += 30
hpmax += 30
mp -= 5
mpmax -= 5
agi -= 1
wis -= 3
str += 4
if(usr.class=="Mage")
hp -= 2
hpmax -= 2
mp += 5
mpmax += 5
agi += 1
wis += 5
str -= 4
if(usr.class=="Scout")
usr <<"you Recieve no Bonuses!"
if(usr.race=="Neko-jin")
lvl = 1
hp = 15
hpmax = 15
mp = 15
mpmax = 15
agi = 10
wis = 9
str = 10
if(usr.class=="Warrior")
hp += 35
hpmax += 35
mp -= 10
mpmax -= 10
agi -= 2
wis -= 6
str += 5
if(usr.class=="Mage")
hp -= 5
hpmax -= 5
mp += 13
mpmax += 13
agi += 4
wis += 10
str -= 8
if(usr.class=="Scout")
usr <<"No Bonuses Added!"


I wanted to insert a proc but Client/New() wont allow it.
In response to Fusioneko
In client/New() you need to be sure to call ..() right off the bat or at least very early.

This section, BTW, will not work:
src.mob.x = src.mob.savedx
src.mob.y = src.mob.savedy
src.mob.z = src.mob.savedz

You need to set those all at once by setting mob.loc. If you try to set the x,y,z vars one at a time, if one of them is invalid then they'll all stay invalid.

Lummox JR