Jump to content
MakeWebGames

Doubling in game...?


ajgraves

Recommended Posts

Hi guys,

This is a repeating issue that seems to haunt most of my mccodes games from the start...?

It seems that there is something in the coding that is causing the game to:

*Take double amount of brave when a crime is succeeded

*Take double funds for travelling

*Take 2 will potions every time the gamer tries to use 1

*Creates a blank post in the forums if they try to start a new topic

I have had this a few times and coders have managed to sort it out some way or another, but this time its effecting the game in more than one way?

Is there something anyone can think of that might be causing this to happen?

Thanks in advance

AJ :mrgreen:

P.S

I'm not a noob game owner, i have done this before and i have also owned some successful games, so please keep comments to the topic as this is a question that i am the only one experiencing. 8-)

Link to comment
Share on other sites

Re: Doubling in game...?

If you have any <img> tags with a src attribute that has no value, er, in plain english, that would look like:

p><p> Okay, so there

If you have something like:

$user_pic' alt='> $user_pic'>

And the user changed their pic to -> ""

In other words, the user put in a NOTHING for an image, and you allow them to do that, then all their pages load twice. Somewhere in your game, there is likely a missing image.

I normally just tell folks to put in some fictitious image name if no image is ready for that yet.

Something like:

blah

And dual page loads are cured. ;)

Link to comment
Share on other sites

Re: Doubling in game...?

Ok guys...

Managed to figure out where the error was coming from, but not what was causing it.

The issue was coming from header.php and it was causing the game to double up in certain points of the game.

The resolution.....? :mrgreen:

We have decided to redesign the header.php using a template offered in the free mods area and w ewill change it from there.

So anyone who has this issue... its your header.php that it causing you the issues! :x

So now the game development is back on and hopefully will be ready for beta in a matter of days!

AJ

Link to comment
Share on other sites

  • 7 months later...

Re: Doubling in game...?

Hy,

The problem is from header.php

If you are usig a custom header look for the

body {

 

I was using the default header with the code in the body:

body {
background-color: #DEDEDE;
margin-top: 0px;
margin-bottom: 0px;
font-family:calibri, helvetica, arial, geneva, sans-serif;font-size:12px;color: black;
  scrollbar-base-color: #005B70; 
  scrollbar-arrow-color: #F3960B;
  scrollbar-DarkShadow-Color: #000000;
}

 

And i wanted to add a background image at the game, so i was adding this code:

body {

 background-image: url('URL HERE');

}

just after the "<style type="text/css"> <!--" and all the crimes token *2 brave (doubleing them)

Now for the header.php to work you just need to replace the code:

 

body {
background-color: #DEDEDE;
margin-top: 0px;
margin-bottom: 0px;
font-family:calibri, helvetica, arial, geneva, sans-serif;font-size:12px;color: black;
  scrollbar-base-color: #005B70; 
  scrollbar-arrow-color: #F3960B;
  scrollbar-DarkShadow-Color: #000000;
}

 

with:

 

body {

 background-image: url('URL HERE');

}

 

so the "standard" header.php will look something like this:

<?php

class headers {
function startheaders() {
global $ir, $set;
echo <<<EOF
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>{$set['game_name']}</title>
<style type="text/css">
<!--
body {

 background-image: url('http://dpg.host56.com/clean.jpg');

}
a:visited,a:active,a:hover,a:link { color: black;text-decoration: none; }
table,tr,td { font-family:helvetica, arial, geneva, sans-serif;font-size: 12px; }
img { border:none; }
textarea { font-family:helvetica, arial, geneva, sans-serif;font-size:12px;color: black; }
................

 

I hope this will help you all, and i tryed to be as explicit i could

Regards,

Link to comment
Share on other sites

Re: Doubling in game...?

Lithium you are wright but maybe for someone who need the solution for this is just what he needed :-D :-D :-D

I hope they will search the topics instead creating a new one

( I believe if the topics were replayed with the solution, people were more regarding to the board)

Wish you all the best

(maybe the admin should close this topic :-P :wink:)

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...