ID:142428
 
ok i found this code and i really like it and how it works but cant seam to get it working how do i code in var or what ever it is to get it to work?
Code:
mob/host
verb
Check_For_AFK()
set category = "GM"
world << "<center><b><font size=2><font color=#FF4466>AFK Check!"
for(var/mob/M in world)
M.AFK_Check()
mob/proc
AFK_Check()
for(var/mob/M in world)
M.said = 0
var/talk = input(M,"Type something, or be booted.")as null|text
if(M.talk)
M.said = 1
world << "[M] has been checked. He/she will not be booted."
else if(!talk)
sleep(600)
world << "<center><b><font size=2><font color=#FF4466>AFK Check has been completed."
if(!M.talk)
world << "[M] has been booted off for being AFK."
sleep(10)
del(M)


Problem description:Getting undefined var can anyone help me out

Christopher52488 wrote:
ok i found this code and i really like it and how it works but cant seam to get it working how do i code in var or what ever it is to get it to work?
Code:
mob/host
> verb
> Check_For_AFK()
> set category = "GM"
> world << "<center><b><font size=2><font color=#FF4466>AFK Check!"
> for(var/mob/M in world)
> M.AFK_Check()
> mob/proc
> AFK_Check()
> for(var/mob/M in world)
> M.said = 0
> var/talk = input(M,"Type something, or be booted.")as null|text
> if(M.talk)
> M.said = 1
> world << "[M] has been checked. He/she will not be booted."
> else if(!talk)
> sleep(600)
> world << "<center><b><font size=2><font color=#FF4466>AFK Check has been completed."
> if(!M.talk)
> world << "[M] has been booted off for being AFK."
> sleep(10)
> del(M)
>

Problem description:Getting undefined var can anyone help me out


Read what the error says, undefined var. You did not define a var. You can figure that out yourself easily as I rather not give you the exact answer since this isn't your snippet.
In response to 172.16.0.1
ok..... im really trying to learn to code im still learning it but slow
In response to Christopher52488
It is better to read the DMGuide than to "steal" someones work.
In response to 172.16.0.1
its something im learning from and how do u define a var? i tried to look it up i cant seem to find it
In response to Christopher52488
Christopher52488 wrote:
its something im learning from and how do u define a var? i tried to look it up i cant seem to find it

Apparently what you currently are doing is not helping you out if you can not define a var. Open up dreammaker, press F1 and type var.
In response to 172.16.0.1
ok i looked it up but dont know which part i should be looking at though
In response to Christopher52488
i mean like mob or client or what evers there
In response to Christopher52488
You don't learn by copying code. You learn by doing a proper tutorial.

http://www.byond.com/members/ DreamMakers?command=view_post&post=40355

If you aren't willing or able to do this, consider a new hobby.
In response to Garthor
its not that i cant learn its just i cant figure out why its not working right thats all i can code somethings but i cant code everything thats why im asking thats all
In response to Christopher52488
I don't care. Do the tutorials. There is literally nothing more basic than this.
In response to Garthor
i did theres to many parts in it its not telling me anything