ID:143718
 
Code:
mob
Logout()
world<<"<World: [src]([src.key]) has logged off..."
..()

world
New()
.=..()
spawn() BootCheck()

proc
BootCheck()
for(var/mob/M in world) if(M.client && M.client.inactivity>=300) {world<<"Naruto AI:([M]) has been kicked for being idle";M.Logout()}
sleep(300)
BootCheck()


Problem description:

hey i finally got my logout mob to work. but now there is another problem well a continued problem with my inactivity check it doesn't boot when i am inactive but the message pops up after i have logged out right above my logout message. Is there a reason why its not working. could be be because i didn't define something right >.>. Here are the two codes plz help and let me know what i did wrong.(had help but i need more). I was in Developer hot to with this but it has become more a a problem seein as tho i got the code to work even had alot of help from erve(sorry ifi spelled it wrong) but the code still isn't working.






Instead of a

sleep(300)

you must want to use

spawn(300) BootCheck()

and you don't have del(src) in the Logout() proc to boot that person. You need to the delete the mob in order to remove them from the game.
In response to QMarkReal
QMarkReal wrote:
Instead of a

sleep(300)

you must want to use

spawn(300) BootCheck()

and you don't have del(src) in the Logout() proc to boot that person. You need to the delete the mob in order to remove them from the game.


so my coding should look like this

mob
Logout()
del(src)
world<<"World:[src]([src.key]) has logged off..."
..()

proc
BootCheck()
for(var/mob/M in world) if(M.client && M.client.inactivity>=300) {world<<"AI:([M]) has been kicked for being idle";M.Logout()}
spawn(300)
BootCheck()

or with its like spawn(300) BootCheck() right next to each other and not under. (sorry it took so long major storm had to shut down comp)
In response to Jason515
mob
Logout()
world<<"World:[src]([src.key]) has logged off..."
del(src)
..()

proc
BootCheck()
for(var/mob/M in world) if(M.client && M.client.inactivity>=300) {world<<"AI:([M]) has been kicked for being idle";M.Logout()}
spawn(300) BootCheck()
In response to Jason515
Bootcheck should be indented under spawn().
In response to QMarkReal
oh ok so i need to add del b4 it i was wondering why it wasn't tellin me i logged out but thank u so much for this i've been going crazy for the last 3 or 4 days trying to get this 1 piece of code in ^_^
In response to Jason515
Omg Thank u and to everyone else who helped me with this Auto boot i really appreciate it. ^_^
In response to Hiddeknight
It doesnt need to be indented. It will call just fine right next to spawn().
In response to QMarkReal
I was replying to him, not you.
In response to Hiddeknight
Actually it worked next to spawn but it's working perfectly now guys thank u so much