DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • July 17, 2019, 03:21:43 AM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1]   Go Down
  Print  
Author Topic: badnav after death  (Read 4029 times)
0 Members and 1 Guest are viewing this topic.
Odyssey
Guest
« on: June 26, 2004, 05:19:10 PM »

Alot of players on my server, including myself, have gotten a badnav in this situation:


   The player dies within the game....
    Gets sent to Land of Shades....
     Decides to Log Out....
      Logs back in before the new day comes around.


  If I/we wait till the new game day, all is well.  


From what I can tell, it's because it's keeping the c=##### code.  Once you log back in, while dead, it throws you right into the Shades.  You can't even log out or anything.

   Any fixes for this?

I'm thinking a reset of some sort to clear out the c= code, correct?
Logged
Odyssey
Guest
« Reply #1 on: June 26, 2004, 06:02:18 PM »

I haven't done anything yet....

   Just kind of thinking out loud here...

$session['user']['allowednavs']="";  // it's where the c=### URLs are stored

in the top of the graveyard page, below the redirect to the Village?

  Something like that?
Logged
Voratus
Guest
« Reply #2 on: June 27, 2004, 12:01:59 PM »

This sounds like some mod put in broke it. Out of the box, this behavior doesn't happen.
login.php redirects you to news.php (unless the player's "location" is 1, which is the Inn), so that's where it sounds like the problem is...your login.php.
You might want to check it out, and see if when someone logs off from in the shades, if that account actually goes offline, or if it still shows up as an online account. Login.php will redirect you to badnav.php if you try to log on when that account is still online.
Logged
Odyssey
Guest
« Reply #3 on: June 27, 2004, 02:10:55 PM »

It was in the login.php.  Thank you for pointing me in the right direction.

  It was a location # issue.   Everything is working now!

Thanks again.
Logged
Odyssey
Guest
« Reply #4 on: June 29, 2004, 06:13:20 AM »

.....Well, sorta....

  The graveyard issue is working, but now it's the same issue when logging out from the village.  You come back in (during the same gameday) with a badnav.

  Attached is my login.php.  Commented on the top of the file is the list of all of my locations.

I know it's a location issue (like the graveyard), but I can't seem to get it.

If anyone could take a look at it, I'd be very grateful!

  Thanks!
Logged
thegleek
Guest
« Reply #5 on: June 29, 2004, 06:50:23 AM »

.....Well, sorta....

The graveyard issue is working, but now it's the same issue when logging out from the village.  You come back in (during the same gameday) with a badnav.

Attached is my login.php.  Commented on the top of the file is the list of all of my locations.

I know it's a location issue (like the graveyard), but I can't seem to get it.

If anyone could take a look at it, I'd be very grateful!

Thanks!

ok, in yer login.php code, why did you change the default of 0 to 20??? no need for that.

your
Code:
db_query("UPDATE accounts SET loggedin=".true.", location=20 WHERE acctid = ".$session[user][acctid]);

that should read location=0 as in the original code. change it back that way.

also, in one more case you changed the default from 0 to 20:


your
Code:
if ($location==20){

so change that 20 to a 0 and i'm thinking it'll all work again...
« Last Edit: June 29, 2004, 06:53:14 AM by thegleek » Logged
Odyssey
Guest
« Reply #6 on: July 17, 2004, 04:58:14 PM »

Well, it was working, as far as the graveyard went, but in turn, the village started messing up.  I have then fixed the village, to which messed up the graveyard.


   When dead, the chain of pages goes:   login -> news -> shades -> graveyard

Here is my redirect code from login.php

Code:
if ($location==0){
redirect("news.php");
   }else if($location==1){
    redirect("inn.php?op=strolldown");
          }else if($location==2){
           redirect("houses.php?op=newday");
                  }else if ($session[user][jail] >="1"){                     

                  redirect("jailhouse.php");
                     }else{

...save user, and so forth

I have even uploaded a brand new, fresh install of login.php (except for the added in jail line), and even a new graveyard.  I even took out the tracker, where each area was asigned a location number for the player list.

   So, I'm thinking it's something with the DB call.  When the player logs out from being dead, something is being kept in the DB, that gives them the bad nav, when back on the news page.

  As of now, I am stuck on the news page, and every link that I click on, does not take me anywhere.  The badnav URL is in the address bar.

   I'm looking at my database, and my location IS 0.  It knows that I'm dead, because I'm getting the "dead" menu in the news:

Code:
if (!$session[user][loggedin]) {

      addnav("Login Screen", "index.php");

   } else if ($session[user][alive]){

      addnav("Village Square","village.php");

   }else{

      if($session['user']['sex'] == 1) {

         addnav("`!`bDudette - You're dead!`b`0");

      } else {

         addnav("`!`bDude - You're dead!`b`0");

      }

      addnav("Preferences","prefs.php");

      addnav("Land of Shades","shades.php");

      addnav("Log out","login.php?op=logout");

      addnav("News");


   What else would keep me from going to shades.php?   The DB knows I'm logged in ("1") and my restore page is: news.php?c=21-192734

   Any ideas?

Thanks!
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Please take the time to read the FAQ and browse the DragonPedia

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
98 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search