se7enet purgatorio

Page 1 of 2 12>
Topic Options
Rate This Topic
#4222 - 07/22/04 11:41 AM Not sure if this is a bug...
Jimp
Cheerios


Registered: 07/22/04
Posts: 132

Offline
hello all

I included a new monster.

and now when people explore, there is a Zero HP monster appearing every now and then, and i think it might be the new monster i added although the new monster is the highest monster available.

the map is set right and so is the monsters lvl, so im unsure why its doin this

ne ideas?

also. how do i add more slots? i was thinking of adding 1 more, im guessin its not too difficult.

cheers

Top
#4223 - 07/22/04 02:37 PM Re: Not sure if this is a bug...
Jamin Administrator
Cookie Crisp
****

Registered: 02/25/05
Posts: 2649
Loc: Texas

Offline
Adam reported the monster thing too. I have no idea what it's doing. If you can, please post a screenshot of the fight screen when it does it. Also, check your Apache error logs and see if it's generating any errors (they'll probably be coming from fight.php or lib.php).

Adding a new slot... not sure how hard it would be, I don't remember how hard-coded that part is. I'll try to look when I get home, if I get time.

---Jamin

Top
#4224 - 07/22/04 05:42 PM Re: Not sure if this is a bug...
Jamin Administrator
Cookie Crisp
****

Registered: 02/25/05
Posts: 2649
Loc: Texas

Offline
I tried adding a monster on my installation and I can't replicate the error, it seems to work fine for me. And that error you posted... it's either not the right error, or it doesn't give me the right information. Try adding error_reporting(E_ALL); at the top of lib.php, right above the $starttime variable. Then play the game till you get the blank monster, then check your error log again. The error should be coming from fight.php or lib.php, I think.

And about the extra slots thing... it's easy. Smiler

In fight.php (the program, not the template), find:
quote:

$page .= "<form action="index.php?do=drop" method="post"><select name="slot"><option value="0">Choose One</option><option value="1">Slot 1: ".$userrow["slot1name"]."</option><option value="2">Slot 2: ".$userrow["slot2name"]."</option><option value="3">Slot 3: ".$userrow["slot3name"]."</option></select> <input type="submit" name="submit" value="Submit" /></form>";

Add as many new option tags as you want, just make sure they match the format of the others. Then add the slot#id and slot#name fields to your users table. I think that's all you need to do.

---Jamin

Top
#4225 - 07/22/04 04:42 PM Re: Not sure if this is a bug...
Jimp
Cheerios


Registered: 07/22/04
Posts: 132

Offline
cheers if u cn do tht.

pppl r saying it cud do with 1 or 2 more slots.

im not gettin the exact error as u suggested bt im getting this -

[Thu Jul 22 23:37:13 2004] [error] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/dk/templates/primary.php:2) in Unknown on line 0

(i have about 30 lines of the same thing as above)

il try & find the Zero HP monster for u.

Top
#4226 - 07/22/04 05:48 PM Re: Not sure if this is a bug...
Jamin Administrator
Cookie Crisp
****

Registered: 02/25/05
Posts: 2649
Loc: Texas

Offline
Oh yeah... also, you'll need to add the new slots to the showchar.php, onlinechar.php and rightnav.php templates so they show up in profiles.

---Jamin

Top
#4227 - 07/23/04 02:20 AM Re: Not sure if this is a bug...
Jimp
Cheerios


Registered: 07/22/04
Posts: 132

Offline
cheers, um - on my forum wen i woke up today i had a lot o fmessages saying something like this -

"sometimes, when a monster drops an item, i click "click here to see and eqip item" and it brings me back to navigation. it sux big time, plz fix. "

im sorry about all the problems, its a good game and that, ive not seen the above problem but a few ppl are sayin this.

i was wondering if its doin this due to the followin reason:

- I changed some stats of the current items, ie: the monster drop lvl and added some extra ones, a day or two after ppl started playing.. could this be the reason or is it something else maybe?

cheers

edit: the slot changes were easy to edit into all the files suggested but im unsure on how to go about adding the tables to the database and where exactly. Also, when new players join - will they have 5 slots?(im addin an xtra 2)

i also just tried addin the tables, but i managed to add 1 more and then it said i had errors in my syntax after attemptin to add another or both at once:

`slot4id` , `slot5id` SELECT *
FROM `dk_users`
WHERE 1
LIMIT 0 , 30

MySQL said:


#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'slot4id` , `slot5id` SELECT *
FROM `dk_users`
WHERE 1 LI

but to be honest, i wasnt sure what i was doin, i was just tryin to copy the other slots. what exactly is best to do? i dont want to mess things up

Top
#4228 - 07/23/04 09:02 AM Re: Not sure if this is a bug...
Adam
Rice Krispies


Registered: 07/19/04
Posts: 279
Loc: England

Offline
Here is a picture of the 0hp monster and its information, i should point out that my map is set to 300.



PS: Im sorry about my other posts, my new email account somehow got hacked by a so called friend......

Top
#4229 - 07/23/04 11:28 AM Re: Not sure if this is a bug...
Jamin Administrator
Cookie Crisp
****

Registered: 02/25/05
Posts: 2649
Loc: Texas

Offline
Ok, I'll answer these in the order I saw them...

1. Bad/incorrect item drops: it's the browser's fault. Sometimes it'll get the page with the drop form stuck in the cache, and randomly bring it back up for no apparent reason. So it looks like you've got a drop, but you really don't. When you click to try to get it, the game thinks you're just trying to hack it and sends you back to the regular exploring screen.

2. In phpMyAdmin, go to your dk_users table and click the SQL link at the top, then put in the following query:
quote:

ALTER TABLE `dk_users` ADD `slot4id` TINYINT UNSIGNED NOT NULL , ADD `slot5id` TINYINT UNSIGNED NOT NULL , ADD `slot4name` VARCHAR( 30 ) NOT NULL , ADD `slot5name` VARCHAR( 30 ) NOT NULL ;



And finally, 3: Now I know why it's doing it! The problem is you didn't fill in all the monsters with levels between 51 and 59. You just added one lvl60 monster. Therefore whenever it tries to find a monster with lvl51-59, it can't, and returns an empty result set. No result set means no monster row, and no monster row means you'll end up with blanks and errors. You need to have at least one monster for every level, otherwise it's going to do that.

---Jamin

Top
#4230 - 07/23/04 11:45 AM Re: Not sure if this is a bug...
Adam
Rice Krispies


Registered: 07/19/04
Posts: 279
Loc: England

Offline
Ahhh it makes sense now.

I didnt realise that about the monsters

Top
#4231 - 07/23/04 12:20 PM Re: Not sure if this is a bug...
Adam
Rice Krispies


Registered: 07/19/04
Posts: 279
Loc: England

Offline
Me again lol

I tried addin 1 extra slot, did it all as u said earlier above and i get this error:

Warning: Cannot modify header information - headers already sent by (output started at /home/public_html/dk/fight.php:1) in /home/public_html/dk/fight.php on line 137

The lines around that are:

$updatequery = doquery("UPDATE {{table}} SET currentmonsterhp='0' WHERE id='".$userrow["id"]."' LIMIT 1", "users");
header("Location: index.php?do=victory");
die();

I dont understand why its doing this. I checked the code i added and it looks fine

Top
#4232 - 07/23/04 12:44 PM Re: Not sure if this is a bug...
Jamin Administrator
Cookie Crisp
****

Registered: 02/25/05
Posts: 2649
Loc: Texas

Offline
I'm at work and don't have my game files available to me right now. I'll try to look at it tonight or tomorrow, but my little bro and sis are visiting this weekend so I might not get a chance till Sunday.

---Jamin

Top
#4233 - 07/23/04 12:48 PM Re: Not sure if this is a bug...
Adam
Rice Krispies


Registered: 07/19/04
Posts: 279
Loc: England

Offline
Ah ok thanks.

All the players are just a bit mad that it failed and are blaming me lol.

Thanks

Top
#4234 - 07/23/04 11:00 PM Re: Not sure if this is a bug...
Jamin Administrator
Cookie Crisp
****

Registered: 02/25/05
Posts: 2649
Loc: Texas

Offline
I'd say just go back to the stock files until I get a chance to look at it. At least then it'll work.

---Jamin

Top
#4235 - 07/24/04 04:32 AM Re: Not sure if this is a bug...
Adam
Rice Krispies


Registered: 07/19/04
Posts: 279
Loc: England

Offline
Ok thanks, ive gone back to the originals.

But do you think you'll find out whats wrong over the weekend?

Thanks

EDIT: Nvm, after reading your post again - you will be.

Top
#4236 - 07/24/04 05:27 PM Re: Not sure if this is a bug...
Jamin Administrator
Cookie Crisp
****

Registered: 02/25/05
Posts: 2649
Loc: Texas

Offline
I attached a modified copy of fight.php to this post (I followed my own instructions to do it, so and it works fine afaik), that adds one new item slot. Use this file after you've added the new fields (slot4name and slot4id) to your users table, and see if it works. If not... I dunno what the deal is.

---Jamin

Top
Page 1 of 2 12>


Hop to:

se7enet

Barack Obama Logo