
Octarine
Members-
Posts
348 -
Joined
-
Last visited
-
Days Won
4
Content Type
Profiles
Forums
Events
Everything posted by Octarine
-
I have beer :P
-
Well a lot of people here use PHP as the script language of choice - it's simple to host, relatively easy to learn, can be run on your own "home" box with ease, and is well supported "out there" by hosting companies up and down the land. How you put together a game though is up to you; html, css, javascript, php are probably the minimum requirements for anything sane, then of course you would almost certainly need some form of persistent store; hence mysql. It would probably be wise to look at one of the WAMP stacks (Windows+Apache+MySQL+PHP) which essentially provide all the key basic elements you need. At the end of the day; if you really want to make a game then you just need to put in a lot of time and effort to create what you need. There are plenty of decent resources on the web; the manuals may be dry but they are worth knowing inside out. Just don't expect to become rich overnight.
-
Keeping the two files together (your html document and the example image) as in this example should work prefect well for you.
-
try echo'ing mysql_error() immediately following the query on line 6 - might provide you with an clue.
-
HD demonstrating community spirit at its finest
-
I think I counted about 50 errors before I fell asleep; any particular one you wanted to look at or you are you just hoping somebody will do complete rewrite for you? The error you mention is not to my knowledge a PHP specific error - ie it is does not stem from the language itself; I can only assume it is generated from one of the includes. Adding error_reporting(-1); ini_set("display_errors",1); at the top of the file (and optionally immediately following any includes or requires) may well yield a large number of clues however.
-
Donator Bank Interest Question
Octarine replied to AnonymousUser's topic in Requests & In Production
Why lock the users table twice when one query is sufficient? -
Define... In what way didn't it work; what part of the MySQL manual is incorrect here; what part of the statement needs refining?
-
ALTER TABLE `table` AUTO_INCREMENT = value; Though *why* you would need escapes me.
-
Flashback to A.K.Dewdney's "Core Wars" article in Scientific American in the 80's. Scripting languages are for pussies - Assembler already! :D
-
You are going in a different direction; why make it overly complex. ""Grades"" can be looked at as different courses in which case my original answer stands, or they can be looked as the same course with a modifier. Which you choose is dependant on your exact needs, but in either case you will need some for of course_completed table tracking the user ID, the course ID (and in your case, the grade they have reached).
-
Think logically, for this to work you need only have some form of requirements that must be completed first. Assuming all you need is certain key courses to be complete prior to starting a new one, then the data structure becomes somewhat apparent: Data Structures and Sample Data and Resulting "Tech" Tree Edit: Addition of a little SQL to fetch the entire (cacheable) course list:
-
Examine the contents of the array after the shuffle; that will yield full placement for each nag.
-
Why not simplify it - all you need in effect is three random numbers (or horses) from seven ... For example; using range() and shuffle()
-
Personally, I'd remove the comma immediately preceding the WHERE clause, but that's just me, I like my queries to work.
-
I've tried a number of different ways of doing this using the following frequency tables Table #1 -- From the first 26 lines (letter:frequency) of dict.txt Table #2 -- From the remainder of the words in dict.txt Table #3 -- A combination of tables 1 & 2 Table #4 -- A well known letter frequency based on the analysis of 10,000 English texts. Table #5 -- My own table based on the above four, then altered by guessing The results Table #1 - tne ysoit cdacv ai tne fodd si tne ohhelbdg-raal aw louol trmjtai'h Table #2 - eta moice hlnhw nc eta uill oc eta irrasvlf-dnns ny sipis edgxenc'r Table #3 - tne ysoit cdacv ai tne fodd si tne ohhelbdg-raal aw louol trmjtai'h (Same as #1) Table #4 - tie fhost wdawv as tie modd hs tie orrelbdy-naal ag louol tncqtas'r Table #5 - (I won't publish yet, but it yields the correct plain text) So using the provided dictionary is in itself not sufficient to crack the text, however with a little manual adjustment of your frequency table you can solve it by looking for common bigrams, trigrams and making the occasional education guess and/or leap of faith. It ~may~ be possible to brute force a letter frequency, but the effort and time involved far exceeds that of simply manually adjusting the letter frequency by hand; think of it like solving an anagram or a crossword puzzle.
-
If the problem persists - take it your host mm; they have had or are having a number of problems.
-
Interesting to note that your hosting provider's own support forums have been full of apologies after a botched upgrade, forcing them to recompile PHP and issue a number of apologies. The last update states that the problem has in theory been rectified; however it would still be wise to have a close look at the output of phpinfo() and perhaps write a few assertions to ensure the problem if it arises again is quickly apparent.
-
TornIsland.com - A post-apocalyptic themed text-based RPG
Octarine replied to DylC0N's topic in Game Projects
Obviously missed the key statement Page load times not-withstanding since browsers should be caching these after the first hit, it's often a legal requirement to retain the copyright notices, however dispensation is usually granted if the relevant credits are published somewhere. I'd accept the praise, and gloss over the minor dig as unimportant, especially from one who excels in such matters. -
Take a guess... function_exists('session_register') or die('session_register is deprecated'); According to the manual: So at a guess your host has upgraded to a pretty recent edition of PHP. Clue: Look at the output of <?php phpinfo(); and pay attention to it.
-
I'm having to guess the Database class has an affected_rows() function, in which case you may find this item_add() replacement viable.
-
- 1
-
-
You have your answer then. Move to a) a different MySQL extension - ie: mysqli or pdo (both of which if memory serve me usually use a native-to-PHP -itself extension so are immune to a degree from OS upgrades, or b) a different host. There is nothing wrong with the mysql extension per say; I've never had a single security problem with it over the more recent counter-parts even though that is one of the most often repeated (and incorrect) reasons for upgrading. Saying that, the mysql extension is rather old; there are a lot of features of MySQL that simply cannot be accessed from it - so it really is about time you upgraded. Check for the mysqli extension at the very least; it is almost a direct shoe-in with a little thinking.
-
<?php function_exists('mysql_connect') or die('mysql extension unavailable.'); $host = 'localhost'; $username = 'root'; $password = ''; $conn = mysql_connect($host, $username, $password); assert(is_resource($conn)); The PHP documentation states that: So you should be looking for mysqli or PDO. Failing that, performing a basic requirements test (as can be seen above) in your code during startup is not a bad idea if you are on managed hosting as providers often fail to notify users of changes.
-
RELEASE is a reserved word. Quote it with back-ticks.