Staff
Administrator
proc
AddEventPoints()
var/mob/Player/M = input("Select a player to give event points.", "Give Event Points") as null|anything in PlayersOnline
if(M)
var/X=input("How many event points do you want to add to [M] ?","Event Points") as num
M.EventPoints += X
M << output("<b>You have received [X] event points.", "ChatOutput")
text2file("[time2text(world.realtime)]: [src] added to [M] [X] event points.<br>","StaffLog.html")
mob
var/tmp/Staff/Administrator/Staff
Login()
src.invisibility = 1
winset(src,"MainWindow","pos=200,100;is-maximized=false")
src.loc = locate(15, 32, 2)
client.focus = src
PlayersOnline += src
Staff = new/Staff
src.Staff.AddEventPoints()
..()
Problem description:
I am not that good dealing with Datums yet, so I am kinda of having some troubles. It is giving me a runtime error. -> runtime error: undefined proc or verb /Staff/AddEventPoints().
Much appreciated if someone could enlight a better way to do similar system in a simple way using datums or some nice tips aswell.
The problem is that you are initializing a type of Staff(), but AddEventPoints() is defined under /Staff/Administrator.