ID:2638891
 
(See the best response by Nadrew.)
Code:
mob/proc/BreedWith(mob/TARGET,ALLOWED) spawn() //Don't want to lock up our callers on sleeps, so we spawn, that means no return values.
//Notably, setting "ALLOWED" is used to just skip asking for permission if your owners aren't the same.
var/mob/MALE
var/mob/FEMALE
if(Gender=="Male" && TARGET.Gender=="Female")
MALE=src
FEMALE=TARGET
if(TARGET.Gender=="Male" && Gender=="Female")
MALE=TARGET
FEMALE=src
switch(MALE.Race)
if("Vampire","Dragon","Svartalfar") return
switch(FEMALE.Race)
if("Vampire","Dragon","Svartalfar") return
if(MALE.Critter) if(!FEMALE.Critter) return
if(FEMALE.Critter) if(!MALE.Critter) return


Problem description: Code\Creatures\Breeding.dm:27:error: .: missing comma ',' or right-paren ')'

Line 27 is referring to switch(MALE.Race)

So, I am attempting to revitalize Dungeon Master and I have immediately come across an error upon attempting to compile the application. This code in particular was utilized around 2012, so I am assuming there was a syntax change by now that is causing this. Or, this commit was not checked beforehand.

It looks like this error occurs whenever we attempt to call the object's properties, but I was unsure off how to solve this since I am unfamiliar with BYOND's syntax. I'll be looking for sources for current syntax as well.

Best response
You're using pre-defined built in values that BYOND uses for "MALE" and "FEMALE" which equate to the strings "male" and "female" respectively.

So your code is actually doing something like

switch("male".race)



You can see all pre-defined values by adding the file "stddef.dm" to your project.

To solve your issue, you'll want to change the MALE and FEMALE variable names to something else.
In response to Nadrew
Thank you for the wonderful insight, that resolved the issue!