Jump to content
MakeWebGames

Octarine

Members
  • Posts

    348
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by Octarine

  1. blacklist.php for one
  2.   Pretty obvious I'd say.
  3. Professionalism at its finest.
  4. Well you certainly can't question the speed of response. I'd doff my cap, but it's collecting pennies for another venture ;)
  5. Really would benefit from unit testing methinks -- < 20 seconds to find a bug though ;) -- Saying that, I have a sneaky suspicion this existed prior to 1.1.4  
  6. Warning: Division by zero in /home/kushcent/public_html/header.php on line 68 ... $experc = (int) ($ir['exp'] / $ir['exp_needed'] * 100); Which suggests that $ir['exp_needed'] is zero does it not? -- IIRC the exp_needed is calculated in the function check_level() in globals.php, something along the lines of pow($ir['level'] + 1, 3) * 2.2 which even for a missing, or null level would produce a semi-sane value therefore the problem is elsewhere. echo / print_r / var_dump is your friend here - ie try inserting something like: echo "<pre>"; print_r($ir); echo"</pre>"; just prior to line 68. Does the contents look sane? Are you looking at the right database? etc etc.
  7. Octarine

    TRUE, FALSE or 0 ,1?

    You could use an ENUM('True', 'False') but its not overly elegant and in fact needs two bytes (ENUMs are stored as a 16-bit unsigned internally iirc), or even a (var)char field with 1/0, yes/no, true/false etc but your in-code logic I find is simplified by the TINYINT(1) method since PHP especially thinks that '0' and false are loosely equivalent. Enums also have some unexpected properties since the database doesn't constrain their contents: create table `test` ( `id` int unsigned not null, `demo` enum('true', 'false'), primary key (`id`) ); insert into `test` (`id`, `demo`) values (1, 0), (2, 1), (3, 2); select `id`, `demo`, `demo` + 0 from `test`; +----+-------+------------+ | id | demo | `demo` + 0 | +----+-------+------------+ | 1 | 0 | | | 2 | true | 1 | | 3 | false | 2 | +----+-------+------------+   Stick to TINYINT(1) ! :D
  8. Danny's list is however ... useless
  9. Octarine

    TRUE, FALSE or 0 ,1?

    A lot of databases MySQL included does not have a BOOL type, rather they revert to synonyms, often by using TINYINT(x) which is one byte wide. A full INT(x) is 4 bytes wide so there is a little saving to be had in using the smaller variant, but that is very much schema dependant. If you needed to save space, then you wouldn't be asking the question. TINYINT(1) UNSIGNED NOT NULL DEFAULT 0; is possibly a reasonable bool value - 0 being false, anything else (usually 1) being true. There is some argument for using the BIT(x) field, but I'd question its portability and support in 3rd party tools. See 11.2 Numeric Types
  10. Well since my crystal ball seems to be on the blink, perhaps you should furnish the good peeps here with the source code relevant to the problem.
  11. The crime names are stored in the database table `crimes`, and remarkably, crime groups in the table `crimegroups`. You should therefore be able to access them from the staff console or via your MySQL administration tool of choice (command-line, Adminer or the ancient, ugly, badly broken and insecure phpMyAdmin)
  12. Me, I'd use CSS/JS
  13. I think that could be asked of any host RoZ... Do I trust my external hosts to not look into data? Pretty much. Do others trust me not to look into there data when I provide hosting? Again, pretty much. There's a stage when almost without fail you have to accept that even under (normal) encrypted communications, some point is reached where that data is in plain text and could be siphoned out. Be it code, be it data, it makes little odds. Z doesn't appear to be overly server-aware given his responses, which equally suggests that it would not be prudent to store client financial transactions on his boxes; but I've no doubt that a small open-source game, or maybe a blog or two would not be a problem from either a security or a complexity angle. - Me, I'd give him the benefit of the doubt.
  14. So if you know how to display a popup, surely a single ajax call can't be too trick? maybe this is more clear?
  15. Not difficult to find .. for example
  16. One has to ask the obvious question, albeit rhetorically; why shut it at all?
  17. In a word ... no. Stick with tried and tested licenses. Seek legal advice if you feel like spending a $ or two, or accept that you will occasionally make minor mistakes and lose out. Find a license that covers the essentials, but is clear and concise. At the end of the day, while licenses are important, the code is more important -- without it, there would be no need for a license -- so don't waste too much time on it. There are a good 15-20 or so current licenses that would cover you; of that, there may be 5 or so which are almost ideal and one maybe two should be pretty dam near perfect.
  18. GPL in any form is the spawn of the devil and should be burnt at the stake along with any programmer even contemplating using it. However, you can still sell GPL licensed code - look at MySQL's licensing policy for an example of this. Personally, I tend to use the BSD (3-clause) license for both open-source and commercial work, but there are plenty of decent alternatives.
  19. Heck, get emacs; it makes the coffee while compiling, doing the ironing, washing the dishes and taking the dog for a walk.
  20. Oh I forgot about the smart phones - I s'pose it does make sense on those. And yes AFAIK the recent round of blunders were zero-day fubar's presumably covering not only the recent releases of 7 but priors well - I must admit to not looking too closely. C++ in comparison? Difficult to really compare. I prefer C, so any heavy duty tests I could consider would almost certainly trounce Java, but that being said, I have seen some blazing fast Java so I guess it comes down to picking the correct language for the job at hand. Mathematically, certainly in the field I often find myself in, then assembler is still the only choice which often means a C or a C++ wrapper which thankfully these days can be linked to just about anything.
  21. Is there still a market for Java? What with all the recent security blunders I'm surprised people still use it :D Not a favourite language of mine I'm afraid - the write once run anywhere paradigm never really worked for me. A produced a few applets, but never really got into the full application programming aspect of it - in part due to idiosyncrasies between JVM providers (notably Sun and Microsoft).
  22. Obviously.
  23. globals.php instantiates the headers class; somewhere near the bottom, and calls a few functions to prepare the page: startheaders(), userdata() and menuarea(). With a little thinking about how the headers class is instantiated, you can actually get rid of the dreaded "one-page-behind" that has plagued McCodes for too long.
×
×
  • Create New...