ID:1930311
 
(See the best response by Nadrew.)
Code:
obj/items/Citem
Eye
verb
ImplantEye()
if(!locate(/obj/Perk/Surgeon) in usr.contents)
usr<<"You're not a surgeon. Stop that....Unless you want to try anyway..."
var/ try = input("Will you give it a go!?")in list("Yes","No")
if(try=="Yes")
if(locate(/obj/Perk/Mastery) in usr.contents)
if(prob(50))
goto Transplant
else
usr<<"You failed."
del src
else
if(prob(10))
goto Transplant
else
usr<<"You fail. Good Game. Well Played."
del src
if(try == "No")
usr<<"Good on you mate."
return


Problem description:
Mating\Illnesses and Genetics\Gene Splicing\Eyes.dm:7:error: missing left-hand argument to =.
Mating\Illnesses and Genetics\Gene Splicing\Eyes.dm:7:error: try without catch
try was recently implemented into the DM language as a keyword, so you can't use it as a variable name. You'll have to rename your try variable.
Best response
You're using a pre-defined name for your variable. 'try' was made an error-handling keyword in the 508 release of BYOND. You'll just need to change 'try' to something else.

You should also avoid using 'goto' and use a less ugly method of executing what you're after.
Any recommendation on what I should replace it with? Yes, I am an amateur coder.
Anything you want really, it's just a variable name.

Something like 'try_input' would work fine, just be sure to change every place the 'try' variable gets used.
Thanks. Helped a lot. Now to make another forum post about a mapping problem I'm having.