an item?
if(usr.mob=mage)"You cant equip this!"
else
ID:261150
Sep 8 2001, 5:05 am
|
|
In response to Deadron
|
|
Deadron wrote:
Air _King wrote: obj/items/Sword icon = 'sword.dmi' verb Equip() set src in usr if(usr.equip >= 1) usr << "[src.name] is allready equiped" else usr.damage += rand(1,8) usr.equip += 1 suffix += "{-Equiped-}" usr << "[src.name] is now equiped" Un_Equip() if(usr.equip == 0) usr << "You don't have anything equiped" else usr.damage-= 20 usr.equip = 0 suffix = "" usr << "Unequiped [src.name]" How are you defining mages?as a mob |
In response to Air _King
|
|
He already told you how to do it look up istype in Dream Maker pressing F1 and it will tell you everything.
|
In response to Nadrew
|
|
obj/items/Sword
icon = 'sword.dmi' verb Equip(mob/mage) set src in usr if(istype(mage)) usr << "You cant equip this!" if(usr.equip >= 1) usr << "[src.name] is allready equiped" else usr.damage += rand(1,8) usr.equip += 1 suffix += "{-Equiped-}" usr << "[src.name] is now equiped" Un_Equip() if(usr.equip == 0) usr << "You don't have anything equiped" else usr.damage-= 20 usr.equip = 0 suffix = "" usr << "Unequiped [src.name]" it compiles fine, but in the game when you try to equip it for both clsses it says you dont have anything equiped.Sorry for bothering you, again I wont bother you agian today if you can fix this! |
In response to Air _King
|
|
Air _King wrote:
obj/items/Swordit compiles fine, but in the game when you try to equip it for both clsses it says you dont have anything equiped.Sorry for bothering you, again I wont bother you agian today if you can fix this! |
In response to Air _King
|
|
obj/items/Sword
icon = 'sword.dmi' verb Equip(mob/mage) set src in usr if(istype(/mob/mage)) usr << "You cant equip this!"</font> if(usr.equip >= 1) usr << "[src.name] is allready equiped" else usr.damage += rand(1,8) usr.equip += 1 suffix += "{-Equiped-}" usr << "[src.name] is now equiped" Un_Equip() if(usr.equip == 0) usr << "You don't have anything equiped" else usr.damage-= 20 usr.equip = 0 suffix = "" usr << "Unequiped [src.name]" I doubt you have mob/Mage taged as the name Mage and is type asks for a path eg:/mob/Mage but I fixed it happy now |
In response to Nadrew
|
|
Nadrew wrote:
obj/items/Swordstats.dm:66:error:/mob/mage:unknown variable type |
In response to Air _King
|
|
Well, change that mob/mage to however you have mage defined. You do actually have a mob called mob/Mage or something like that, right? You said you had mage defined as a mob, after all. I'd hate to think that you have no idea what you're talking about.
This is why I advise everyone not to give help to you people until you have some basic level of understanding of how the system works. If you don't understand the answer to the question, it just leads to more questions. |
In response to LexyBitch
|
|
the path isnt the problem this is: stats.dm:66:error:/mob/mage:unknown variable type
|
In response to Air _King
|
|
Air _King wrote:
the path isnt the problem this is: stats.dm:66:error:/mob/mage:unknown variable type I just saw what I did wrond if(istype(usr,/mob/mage) thats how the istype line should look like I was moving to fast |
In response to Air _King
|
|
Air _King wrote:
the path isnt the problem this is: stats.dm:66:error:/mob/mage:unknown variable type *Sigh* Alathon |
In response to Nadrew
|
|
thankyou!
|
In response to Air _King
|
|
Air _King wrote:
thankyou! hmm I guess it works then... |
We can't answer this for you, because it depends on your code.
How are you defining mages?
Are they an object type? Are they defined by an attribute?
You might hit F1 in DreamMaker and search on istype().
If that doesn't help, go here.