I cant figure out the errors :(
Code:
obj/taser/wear()
if(!src.equiped)
var/obj/O
for(O in usr)
if(O.equiped && O.slot_name == src.slot_name)
usr << "You are already wearing [O]."
return 0
src.suffix = src.slot_name
src.equiped = 1
view() << "[usr] wears [src]."
usr.AddArmor(src.armor)
usr.defense *= src.defense
Errors:
Chicken Hunter.dm:163:error:src.equiped:bad var
Chicken Hunter.dm:166:error:O.equiped:bad var
Chicken Hunter.dm:166:error:O.slot_name:bad var
Chicken Hunter.dm:166:error:src.slot_name:bad var
Chicken Hunter.dm:171:error:src.slot_name:bad var
Chicken Hunter.dm:172:error:src.equiped:bad var
Chicken Hunter.dm:175:error:src.armor:bad var
Chicken Hunter.dm:175:error:usr.AddArmor:bad proc
Chicken Hunter.dm:176:error:usr.defense:bad var
Chicken Hunter.dm:176:error:src.defense:bad var
Chicken Hunter.dm:162:error:wear :undefined proc
Thanx
Shane
ID:151148
Mar 6 2001, 10:41 am
|
|
In response to Deadron
|
|
One MAJOR error I see is you have what seems to me to be a verb or proc which is not defined under your taser.
obj/taser/wear() This should be obj/taser/verb/wear()//If wear() is a verb |
When you have a bunch of errors, don't worry about all of them. Just worry about the one at the top, fix that, then see if that fixes the others.
So your first error is:
Now if you check the BYOND FAQ Bad Var discussion you'll see that the first sentence says:
the object does not have a var with that name
So let's look at where the error is:
This is looking for src.equiped, which is taser.equiped. Do objects have an equiped variable? Is it maybe spelled 'equipped'? Does the equiped variable actually belong to mobs?
Without seeing more of your code I can't say, but this is the thing to look for first.