ID:679419
 
Keywords: datum
(See the best response by DarkCampainger.)
Code:
datum/combat
start(mob/P)
//stuff


Problem description:

Alrighty, so I'm trying to make a turn-based combat system using datums, but when I set it up like above, it gives me this error:
combat.dm:4:error: start: undefined proc

However, I've seen snippets and tutorials set it up like this, including ForumAccount's Datum tutorial, and now I'm HORRIBLY confused.

Best response
You need to use the proc keyword when initially defining a process (you don't need it when overriding it in a child type):

datum/combat
proc
start(mob/P)
//stuff
Alright, I think I'm starting to understand, but now I've got a followup question. How could I set it so that if a player steps into certain area it calls the start proc?
Create a new combat object and call its start proc (same way you would call anything basically).
In response to Spunky_Girl
After hearing you say that, something clicked and it just hit me how datums worked and what I was doing wrong. I kinda feel silly now that I realize how simple it is, haha.

Anyways, thanks for the help, Spunky_Girl and DarkCampainger.