ID:263927
 
Problem description: Im coding berries for my game and i change the 3rd verb for one of them and i get these errors:


Berries.dm:403:Y :warning: variable defined but not used
Berries.dm:421:error:Hold :duplicate definition
Berries.dm:401:error:Hold :previous definition
Berries.dm:422:error:= :conflicts with previous definition
Berries.dm:412:error:Get :duplicate definition
Berries.dm:392:error:Get :previous definition
Berries.dm:417:error:Drop :duplicate definition
Berries.dm:397:error:Drop :previous definition

SinnohAdventures.dmb - 7 errors, 1 warning (double-click on an error to jump to it)

It didnt do that untill i changed a verb
should you post the code?
In response to Aang-Air bender
first berry verb set:
        Iapapa_Berry
icon = 'Berries.dmi'
icon_state = "Iapapa Berry"
verb
Get()
set name = "Get"
set src in view(1)
Move(usr)
view(2) << "[usr] picked up the [src]"
Drop()//if they drop him....
set name = "Drop"//set the name
src.loc=locate(usr.x,usr.y,usr.z)//where usr was last standing
usr << "<font color = yellow>You drop the [src]!"//a little message
Eat()
set name = "Eat"
var/Y = usr.HP/2
usr.HP += Y
if(usr.HP>usr.maxHP)
usr.HP=usr.maxHP
view() << "[usr] eat the Iapapa Berry!"
sleep(10)
view() << "[usr]'s HP was increased by [Y]!"
if(prob(30))
usr.confused=1
view() << "[usr] became confused!"
var/obj/Berries/Iapapa_Berry/P
for(P in usr.contents)
del(P)

second berry verb set:
        Occa_Berry
icon = 'Berries.dmi'
icon_state = "Occa Berry"
verb
Get()
set name = "Get"
set src in view(1)
Move(usr)
view(2) << "[usr] picked up the [src]"
Drop()//if they drop him....
set name = "Drop"//set the name
src.loc=locate(usr.x,usr.y,usr.z)//where usr was last standing
usr << "<font color = yellow>You drop the [src]!"//a little message
Hold()
set name = "Eat"
usr.OccaBerry=1
view() << "[usr] holds the Occa Berry!"
In response to Deity Production 08
wait its fine when i take out the last berry. maybe i just gatta finish it. let me try

Edit: Yes, i just had to change the name cuz i had the name twice, but thanks
In response to Deity Production 08
Notice how you've written the same exact verb at least twice? That's a big hint that you need some object-oriented design. Like this:

obj
item
verb
//all items can be picked up and dropped
Get()
set src in oview(1)
if(Move(usr))
view(2) << "[usr] has picked up [src]"
Drop()
if(Move(usr.loc))
usr << "\yellowYou drop [src]!"
Berries
icon = 'Berries.dmi'
//all berries can be eaten
verb
Eat()
usr << "You eat [src]. Yum!"
del(src)
Iapapa_Berry
icon_state = "Iapapa Berry"
Eat()
var/Y = usr.HP/2
usr.heal()
view() << "[usr] eats the Iapapa Berry!"
//I've removed the sleep because it allows one berry to be eaten multiple times
view() << "[usr]'s HP was increased by [Y]!"
if(prob(30))
usr.confused = 1
view() << "[usr] has become confused!"
//did you really intend to delete every berry?
for(var/obj/item/Berries/Iapapa_Berry/P in usr)
del(P)

Occa_Berry
verb
Hold()
usr.OccaBerry = 1
view() << "[usr] holds the Occa Berry!"

mob
proc
//generic proc for healing
heal(var/v)
HP += v
if(HP > maxHP)
HP = maxHP
//later, you might add a bit of green text (ie +500) to indicate you've been healed