mob
WeaponTechnician
icon='NPCS.dmi'
icon_state="Barber"
HP=99999999999999999999999999999999999999999999999999
DblClick()
alert("Hi, here for a wep upgrade?")
var/weplist = list()
if(locate(/obj) in usr:contents)
for(var/obj/Weapons/O in usr:contents)
weplist += O
var/C = input("Pick a Weapon to Upgrade","Upgrade") in weplist + list("Cancel")
if(C!= "Cancel")
if(alert("Are You sure you wish to upgrade [C]?","[C]","Yes","No") == "Yes")
if(usr.wealth<=1000)
alert("You dont have enough")
else
C.BulletDammage+=5
usr.wealth-=1000
alert("Enjoy the extra strength")
Problem description:
Supposed to upgrade the selected weapons strength by 5, but it comes up 360:error:C.BulletDammage:undefined var, ive added the bulletdammage var to the vars list, and to the weapons themselves....any help?
Meaning you'll have to change this line to the following;
You don't need to define "Cancel" as a list; simply adding it as a text string will work.