Jump to content
MakeWebGames

Players disappearing? Here's why!


Konsigliare

Recommended Posts

Basically there's a sneaky line in control.php that deletes players after being offline for a set amount of time.

I've deleted mine and can't remember what line or what how often it deletes, but it is near the top of control.php

Took me several weeks before I realised why they disappeared :(

Link to comment
Share on other sites

Find and delete:

$result = mysql_query("SELECT * FROM `grpgusers` ORDER BY `lastactive` DESC");

while($line = mysql_fetch_array($result, MYSQL_ASSOC)) {

$secondsago = time()-$line['lastactive'];

if ($secondsago > 2592000) {

$user_online = new User($line['id']);

$result2 = mysql_query("DELETE FROM `grpgusers` WHERE `id`='".$user_online->id."'");

}

}

Link to comment
Share on other sites

Find and delete:

$result = mysql_query("SELECT * FROM `grpgusers` ORDER BY `lastactive` DESC");

while($line = mysql_fetch_array($result, MYSQL_ASSOC)) {

$secondsago = time()-$line['lastactive'];

if ($secondsago > 2592000) {

$user_online = new User($line['id']);

$result2 = mysql_query("DELETE FROM `grpgusers` WHERE `id`='".$user_online->id."'");

}

}

That's what it is, thanks for posting.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...