ID:146477
 
I've code this up and when i did it didnt seem to fit into my dbz game this is the error i have

timemachinekeys.dm:26:error:src.Equiped:undefined var

this is the line it is on
                if(src.equiped == 0)


Heres the full coding

            Drop()
set category = null
if(src.equiped == 0)
src.loc = usr.loc
usr << "You have dropped the: <u>[src]</u>."
usr.key = 0
else
usr << "You are unable to drop: <u>[src.name]</u>, it's already equipped."


How can i fix this problem?
Are you sure that equiped is definied?
I think you misspelled it, try putting equipped instead of equiped
else define it in a var

O-matic
Firstly don't do if(var==0) or if(var==1) for boolean variables.

Secondly, error:src.Equiped:undefined var, would never refer to this line: if(src.equiped == 0)
http://developer.byond.com/hub/Goku72/ EquipmentInventory_System

That explains, & gives examples of how to properly setup an inventory & equipment system. And, if you come back to the forums asking how to still use yours - I'll physically track you down & beat you with a large metal shaft-like-object.
Woah woah woah! You can't use the key variable like that! It's a predefined mob variable, which reflects the key of the client the mob belongs to. If you set it to a value, other than the key of the client, the player will be disconnected! Define another variable.
In response to DeathAwaitsU
DeathAwaitsU wrote:
Firstly don't do if(var==0) or if(var==1) for boolean variables.

Secondly, error:src.Equiped:undefined var, would never refer to this line: if(src.equiped == 0)

How should i do it?
In response to Govegtos
Govegtos wrote:
DeathAwaitsU wrote:
Firstly don't do if(var==0) or if(var==1) for boolean variables.

Secondly, error:src.Equiped:undefined var, would never refer to this line: if(src.equiped == 0)

How should i do it?

No one here's going to tell you how to do something incorrectly. So, stop asking for the simple cheesy way to do things. Read my other post in this forum, it explains all you need to know.