ID:178890
 
mob/player
Login()
..()
usr.icon = 'player.dmi'
icon_state = "Normal"
world << "[usr] joins the game."
usr.pnum = plnum
world<<"usr's pnum"
usr.loc = locate(2,2,1)
name = input("[usr]","what is your name?","Name","[key]")
I get this error
runtime error: type mismatch
proc name: Login (/mob/player/Login)
usr: Vermolius (/mob/player)
src: Vermolius (/mob/player)
call stack:
Vermolius (/mob/player): Login()
In response to Mexus
Mexus wrote:
I get this error
runtime error: type mismatch
proc name: Login (/mob/player/Login)
usr: Vermolius (/mob/player)
src: Vermolius (/mob/player)
call stack:
Vermolius (/mob/player): Login()

I'm afraid I don't see it; knowing which line it's on would help. (You can set your project preferences so it compiles in debug mode.)
One thing I recommend, though it may be irrelevant here, is that you don't use usr; use src. usr is always type /mob (it won't be a /mob/player, so you'd have to cast it) and it only really applies during verbs. Best not to use it.

It is possible, though I think only vaguely, that the usr.pnum line is the problem because usr isn't the right type; removing usr could solve your problem.

Lummox JR
Mexus wrote:
mob/player
Login()
..()
usr.icon = 'player.dmi'
icon_state = "Normal"
world << "[usr] joins the game."
usr.pnum = plnum
world<<"usr's pnum"
usr.loc = locate(2,2,1)
name = input("[usr]","what is your name?","Name","[key]")

The input() doesn't need to have usr in brackets or quotes... Just
input(usr, "What is your name","Name","[key]")
will work...

Other than that...I don't see any problems...unless there is some sort of conflict with some other part of your code...

I see something else that probably needs to be changed, though... It looks like you want the line
world<< "usr's pnum"
to output the usr's pnum value to the world... But the way it's written...the world will see "usr's pnum"... Not a number...exactly what's in those quotes... To output the actual pnum of the usr...it should be
world<< "[usr.pnum]"
... That will output the value of that usr's pnum variable...