1.The inn won't heal spoints I've tryed to edit the code on my own but it just won't work
2.I want to change the backround to black and I know how but I need to change the text color and fonts to ALL the text how do you do that
3.I want to have a creature kill leaderboard and tournaments how do I do this?
4.I want to have a player message system yet I have absolutely no idea how to do this.
I know I may seem whiney and helpless but I just want to get things done..........
Browser Game Questions
Browser Game Questions
Coding-PHP, Javascript, C++, HTML, mySQL
Modeling/Art-Blender, GIMP
Games-Unity, Game Maker 8
Modeling/Art-Blender, GIMP
Games-Unity, Game Maker 8
Re: Browser Game Questions
1. Turn your PHP errors on.
2. after each mysql_query function add, or die(mysql_error());
eg,
3. Should you stumble accross an error you're not sure how to fix. Google knows many great things. Give it a try: http://google.com/
4. Look over your PHP, think to yourself if the scturcture is logical.
Trial and error is the best way of learning. Don't ask too be spoon fed too much or you will never get the hang of PHP.
2. after each mysql_query function add, or die(mysql_error());
eg,
Code: Select all
<?php
mysql_query("SELECT * FROM `gay`") or die(mysql_error());
?>
4. Look over your PHP, think to yourself if the scturcture is logical.
Trial and error is the best way of learning. Don't ask too be spoon fed too much or you will never get the hang of PHP.
Fighting for peace is declaring war on war. If you want peace be peaceful.
Re: Browser Game Questions
You can also change "die(mysql_error())" to something more meaningful. I usually put in some text telling what I'm trying to do and what file is causing the problem - helps track down problems easier than the generic mysql messages sometimes.
Up to you though
Up to you though
Re: Browser Game Questions
Yeah, but generally you want to diagnose any errors that might be causing your problem. That's why I told you that. Of course you can put your own text in:
die("Some shit");
die("Some shit");
Fighting for peace is declaring war on war. If you want peace be peaceful.
Re: Browser Game Questions
but I only suggest putting in your own text as reference to code where as if an error arises you know where then you can use mysql_error().
if an error arises then it will show "Error in selecting all from gay table'" then you reference back to that then place in the mysql_error()
Code: Select all
<?php
mysql_query("SELECT * FROM `gay`") or die('Error in selecting all from gay table');
?>
Code: Select all
<?php
mysql_query("SELECT * FROM `gay`") or die(mysql_query());
?>
Laguages:
PHP, MYSQL, (X)HTML, HTML5, JQuery, CSS 3.0,
C, C#, C++, Python, Pascal, Perl, Ruby, Turing
Software:
Adobe MC CS4, Visual Studio 2008, Notepad++,
NetBeans IDE, WAMPSERVER
Browsers:
Internet Explorer, Firefox, Opera, Safari, Chrome
(Always have latest patches for browsers.)
Free time:
...
PHP, MYSQL, (X)HTML, HTML5, JQuery, CSS 3.0,
C, C#, C++, Python, Pascal, Perl, Ruby, Turing
Software:
Adobe MC CS4, Visual Studio 2008, Notepad++,
NetBeans IDE, WAMPSERVER
Browsers:
Internet Explorer, Firefox, Opera, Safari, Chrome
(Always have latest patches for browsers.)
Free time:
...
-
deluxxmanx
- Posts: 88
- Joined: Thu Nov 26, 2009 10:22 pm
Re: Browser Game Questions
About the font as much as I understood what you need, you meant to change the background to black, & let's say make all or a part of the fonts white? I use this then: <font color=white> Text </font color>
So let's say for example:
I don't know if you knew this already, but if you don't this might help you mate.
<b> TexT </b> - makes text bold.
<u> TexT </u> - underlines the text.
<h3> TexT </h3> - set the fonts size. (number 3 can be anything [the smaller the number the bigger the font])
<font color=white> TexT </font color>
Hope this helps at least a tiny bit mate, good luck on your project!
So let's say for example:
Code: Select all
<?php
start_session ()
include "globals.php"
echo "<font color=red>Welcome to the game!</color>"
?><b> TexT </b> - makes text bold.
<u> TexT </u> - underlines the text.
<h3> TexT </h3> - set the fonts size. (number 3 can be anything [the smaller the number the bigger the font])
<font color=white> TexT </font color>
Hope this helps at least a tiny bit mate, good luck on your project!

I am a PS CS4 artist. Signature above made by me.
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: Browser Game Questions
You should not be using the font tags in HTML, as they are deprecated. Instead, CSS should be used. Eventually, those deprecated tags are going to be removed, which means that they will not render correctly when browsers are updated to the standard. Best to make it future-compatible now, rather than have to change hundreds of pages later.
Here is a great CSS primer.
Here is a great CSS primer.
The indelible lord of tl;dr
Re: Browser Game Questions
Great thanks! That's where I learned HTML a bit of of JS and some PHP but never really dabbed into to CSS that much. I will need to study up on that a bit
Coding-PHP, Javascript, C++, HTML, mySQL
Modeling/Art-Blender, GIMP
Games-Unity, Game Maker 8
Modeling/Art-Blender, GIMP
Games-Unity, Game Maker 8
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: Browser Game Questions
Just don't over complicate yourself, which is really easy to do while learning CSS. It can get extraordinarily complicated when you are making artistic web pages, but just knowing how to slap some font attributes and basic formatting through CSS is very helpful.ZeroComp wrote:Great thanks! That's where I learned HTML a bit of of JS and some PHP but never really dabbed into to CSS that much. I will need to study up on that a bit
The indelible lord of tl;dr