ID:1060415
 
(See the best response by Kaiochao.)
Code:
/datum/job/detective
title = "Detective"
flag = DETECTIVE
department_flag = ENGSEC
faction = "Station"
total_positions = 1
spawn_positions = 1
supervisors = "the head of security"
selection_color = "#ffeeee"
alt_titles = list("Forensic Technician")
paycheckamt = rand(45,65)


Problem description:
At the paycheckamt, I am recieving the error: expected a constant expression

I'm sure I did some small thing wrong. But we all make mistakes. Also yes, that is a variable and it is defined.

Best response
rand(45,65) is not a constant expression. Put it in New().

FYI: Datums don't need to be defined explicitly under /datum.

e.g.
job/detective
...
New()
paycheckamt = rand(45, 65)