ID:268476
 
Kepp getting this...

runtime error: type mismatch
proc name: Buy (/obj/guilddoor2/verb/Buy)
source file: myturfs.dm,616
usr: Dante_Zero (/mob/characters/HalfSaiyanSL)
src: the guilddoor2 (/obj/guilddoor2)
call stack:
the guilddoor2 (/obj/guilddoor2): Buy()


    guilddoor2
icon = 'neoturfs.dmi'
icon_state = "door"
density = 1
layer = MOB_LAYER + 2
var/password
var/opened=0
var/bought = 0
verb
Buy()
set src in oview(1)
set category="Door"
if(src.bought == 0||src.bought == null)
switch(alert("Would you like to Purchase this Guild?", "Purchase", "Yes","No"))
if("Yes")
if(usr.Zenni < 1000)//$$$$$$ Line 616
usr<<"This costs 1000 zenni!"
if(usr.Zenni >= 1000)
usr.Zenni -= 1000
usr<<"Okay! You may enter!"
src.name = "[usr]'s Guild"
src.bought = 1
Open()
set src in oview(1)
set category="Door"
set name="Open"
if(src.password == null && src.bought == 1)
var/password1 = input("What do you wish to make the password?") as text
src.password = password1
else
if(src.opened == 0 && src.bought == 1||src.opened == null && src.bought == 1)
var/choice = input("What is the password?") as text
if(choice == src.password)
usr.loc=locate(43,3,10)

else
usr<<"Incorrect Password!"
else
usr<<"This Guild is for sale!"
Eight replies is hardly an ignore.
Without knowing what line 616 is, we really can't.
It would seem as though usr.Zenni isn't a number. Look for anywhere in your code where you could have added something that wasn't a number.
In response to Garthor
Garthor wrote:
Without knowing what line 616 is, we really can't.


If ya look you'll see a labled the line \\ $$$$$ Line 616
In response to HavenMaster
HavenMaster wrote:
It would seem as though usr.Zenni isn't a number. Look for anywhere in your code where you could have added something that wasn't a number.

OK I'll do that thx.
In response to HavenMaster
HavenMaster wrote:
It would seem as though usr.Zenni isn't a number. Look for anywhere in your code where you could have added something that wasn't a number.

weird every time I use any verb I get that type mismatch error...