ID:145762
 
Code:
mob 
icon='person.dmi'
Login()
icon_state = gender
world << "[src] has logged in"
..()
Rat
icon='rat.dmi'
HP = 15
DeathCheck()
if (HP <= 0)
view() << "[src] was killed"
if(prob(80))
var/obj/copper_piece/G = new(loc) //makes coins where the rat was
G.amount = rand(1,4)
Gainexp(25)
Del()
..()
verb
Pebble_throw()
usr << "<i>You sling a pebble from the ground</i>"
oview() << "<i>[usr] slings a pebble from the ground</i>"
sleep(5)
var/obj/pebble/P = new(usr.loc)
walk(P,usr.dir,2)
sleep(20)
del(P)

obj
pebble
icon='rock.dmi'
density=1
Bump(atom/O)
var/damage= rand(1,10)
if(ismob(O))
usr << "You hit [O]!"
O:HP -= damage
O:DeathCheck(usr)
O << "You take [damage] damage."
del(src)


Problem description:

1.My character's icon always shows up as a neuter state no matter what the gender of my key is.

2.When I kill an enemy with a special attack, the enemy dies but my character does not get expierience like when I kill it with a normal attack.
By default mob.gender will be neuter. Look up client.gender, as it is taken directly from the their key's people's page.

It would also help to see what is in Gainexp().

~~> Unknown Person
There is inconsistent indentation here.

mob
icon = 'person.dmi'
Login() // the lines of code after this need to be indented as shown
icon_state = gender
world << "[src] has logged in"
..()
In response to Magus_Christel
I think that's just because of the copy/pasting. Notice how his throw pebble verb is also wrongly done.
In response to Unknown Person
That's one problem fixed easily, but anyone know what to do about the speacial attacks, here's my Gainexp() and LvUp() code:

LvUp()
if (usr.EXP >= usr.maxEXP)
usr.LV += 1
usr << "<font color=blue> Congradulations!, you are now level [usr.LV]"

Gainexp(N)
usr.EXP += N
LvUp()
In response to Drayg
Your rats Deathcheck() doesn't take an argument, but when you call Deathcheck(), you're sending an argument. Not to mention those procs shouldn't have usr, it should be src, and when you call them you need to make sure the mob calls it, i.e.
mob/Rat/Deathcheck(mob/killer)
//normal stuff inserted here
killer.Gainexp(#)


That's of course assuming the procs are mob/proc, not normal procs.
No put usr in proc. Ungh.

And you can set gender=client.gender in Login() if you want to be sure you have the right one.

Lummox JR
In response to Detnom
I replaced all the usrs with src and changed the deathcheck proc to this:
DeathCheck(mob/killer)
if (HP <= 0)
view() << "[src] was killed by [killer]"
if(prob(80))
var/obj/copper_piece/G = new(loc) //makes coins where the rat was
G.amount = rand(1,4)
killer.Gainexp(25)
Del()
..()


It still doesn't work and i get this runtime error :runtime error: undefined proc or verb /obj/pebble/Gainexp().

proc name: DeathCheck (/mob/Rat/DeathCheck)
source file: Game.dm,66
usr: 0
src: Rat (/mob/Rat)
call stack:
Rat (/mob/Rat): DeathCheck(the pebble (/obj/pebble))
the pebble (/obj/pebble): Bump(Rat (/mob/Rat))
In response to Drayg
Is that pebble a projectile? If so, it looks like your death process is calling with the pebble as the killer, instead of the person who launched the pebble. You'll want to send some info to the pebble so it knows who owns it, and when someone gets hit by it, it will send the owner of the pebble through the death check as the killer instead of the pebble.