ID:148378
 
Every time the mob tries to create the focus it gets a error.

mob
verb
Make_Focus()
set name ="Make Focus"
var/tmp/focuses=new/list()
if(!usr.contents.Find(/obj/Focus/ Blood)&&!usr.contents.Find(/obj/Focus/Sword))

if(usr.learnedspells.Find("Flash"))
focuses+="FlashSword"
focuses+="None"
var/ask=input("What focus do you want to make?") in focuses
switch(ask)
if("FlashSword")
for (var/obj/O in usr)
var/tmp/Swords=new/list
if(O.name == "Sword")
O+=Swords
var/PickSword=input("Which Sword") in Swords
switch(PickSword)
if("Sword")
O.icon_state="sword2"
O.name="FlashSword"
for (var/obj/O in usr)
var/tmp/Blood=new/list
if(O.name == "Blood")
O+=Blood
var/PickBlood=input("Which Blood") in Blood
switch(PickBlood)
if("Blood")
del(O)

_________________________
The error

runtime error: type mismatch
proc name: Make Focus (/mob/verb/Make_Focus)
usr: Rollerc (/mob/player)
src: Rollerc (/mob/player)
call stack:
Rollerc (/mob/player): Make Focus()
runtime error: type mismatch
proc name: Make Focus (/mob/verb/Make_Focus)
usr: Rollerc (/mob/player)
src: Rollerc (/mob/player)
call stack:
Rollerc (/mob/player): Make Focus()




Rollerc wrote:
Every time the mob tries to create the focus it gets a error.

mob
verb
Make_Focus()
set name ="Make Focus"
var/tmp/focuses=new/list()
if(!usr.contents.Find(/obj/Focus/ Blood)&&!usr.contents.Find(/obj/Focus/Sword))

if(usr.learnedspells.Find("Flash"))
focuses+="FlashSword"
focuses+="None"
var/ask=input("What focus do you want to make?") in focuses
switch(ask)
if("FlashSword")
for (var/obj/O in usr)
var/tmp/Swords=new/list
if(O.name == "Sword")
O+=Swords
var/PickSword=input("Which Sword") in Swords
switch(PickSword)
if("Sword")
O.icon_state="sword2"
O.name="FlashSword"
for (var/obj/O in usr)
var/tmp/Blood=new/list
if(O.name == "Blood")
O+=Blood
var/PickBlood=input("Which Blood") in Blood
switch(PickBlood)
if("Blood")
del(O)

_________________________
The error

runtime error: type mismatch
proc name: Make Focus (/mob/verb/Make_Focus)
usr: Rollerc (/mob/player)
src: Rollerc (/mob/player)
call stack:
Rollerc (/mob/player): Make Focus()
runtime error: type mismatch
proc name: Make Focus (/mob/verb/Make_Focus)
usr: Rollerc (/mob/player)
src: Rollerc (/mob/player)
call stack:
Rollerc (/mob/player): Make Focus()





You are attempting to add the list Swords to the /obj/ O - Type missmatch.

You are attempting to add the variable Blood to O - Type missmatch
In response to Alathon
I tried using O.name and that dont work too...
In response to Rollerc
Rollerc wrote:
I tried using O.name and that dont work too...

Exactly what are you trying to do. I really can't figure it out from the code, because the errors make it way too obscure.
In response to Alathon
I am tring to add all the swords that the person has to a list.So the person can pick which sword he wants to use.When I use O.name it works but I want it so i can delete the sword after it is used to create the magic item.Done a little updating on it but I still want it so I can delete the sword and blood the person picks.


mob
verb
Make_Focus()
set name ="Make Focus"
var/tmp/focuses=new/list()
if(!usr.contents.Find(/obj/Focus/ Blood)&&!usr.contents.Find(/obj/Focus/Sword))

if(usr.learnedspells.Find("Flash"))
focuses+="FlashSword"
focuses+="None"
var/ask=input("What focus do you want to make?") in focuses
switch(ask)
if("FlashSword")
for (var/obj/O in usr)
var/tmp/list/Swords=new()
if(O.name == "Sword")
Swords += O.name

var/PickSword=input("Which Sword") in Swords

switch(PickSword)
if("Sword")
var/tmp/amount
if(amount==0)
world<<"BOB"
amount+=1
new /obj/FlashSword(usr)
else
goto blood

blood:
for (var/obj/O in usr)
var/tmp/list/Blood
if(O.name == "Blood")
O.name+=Blood
var/PickBlood=input("Which Blood") in Blood
switch(PickBlood)
if("Sword")
var/tmp/amount
if(amount==0)
world<<"BOOB"
amount+=1

else
return
In response to Rollerc
If you want to delete the sword after using it, store the actual objects in the Swords list.

I still don't see what your trying to do with blood. What its doing now is adding an empty list to the end of all objects names if its name is "Blood"
In response to Alathon
THe person needs blood and the sword to create the flash sword.