-
Posts
228 -
Joined
-
Last visited
-
Days Won
9
Content Type
Profiles
Forums
Events
Everything posted by G7470
-
This isn't an issue with that particular code itself. The issue is related to other code that was placed on that file. Usually when this happens, you did not close something properly, so it doesn't know what to do when it hits the SELECT statement. What's the code surrounding that snippet? (20 lines above, 20 lines below) ~G7470
-
Would something like this work? ([-+.]*[0-9]+)+([,]*(, )*[-+.]*[0-9]+)+ (used RegExr to go through test cases appropriately) ~G7470
-
As I could not find any syntax errors on this file PHP-wise (and have ran it through a PHP code validator to verify this), there may be a few reasons as to why this may not be working at all (assuming that the variable $ir is defined): The variable $lottoconfig is not defined anywhere. It's not defined on this file, so unless it's defined in one of your include files, then you have a problem there. You are checking it on line 7, so if that is not set, it'll break. You do not have any of the tables for this mod in your database yet. For example, in the lotto() function, it is immediately running a query on the lottery_players table. If that doesn't exist, this won't work. money_formatter() function is not defined. I think that this is defined in RC, but as I don't have a copy of that engine myself, I can't say for sure. I would double-check that. I would suggest displaying all of your errors (using error_reporting(E_ALL); to do so) so that you will be able to get a handle on what's going on in your code. ~G7470
-
I decided to give this a go on my phone - I could not login, sign up, or do anything outside of the main page. You should probably look into that. Take a look at other sites - their designs are in chunks in order to fill the page properly. Trying this directly on my phone, I did see that it fit OK on my phone, but it's not mobile-friendly. The design size is clearly built for a mobile device (as on the desktop it only fills half of the screen), but the design itself only works on a desktop (as you cannot even remotely see the login textboxes from your phone without having to drastically zoom in). So, my advice - focus your design to be "designed" for one device platform (mobile and/or desktop) and then optimize it for the other down the road. You're attempting to open up into way too many markets too quickly - which is drastically hurting your user experience. ~G7470
-
Request for Business mod for Version two
G7470 replied to Mcfarlin's topic in Requests & In Production
I would jump on this right now, but I have a lot currently on my plate that have some deadlines I have to meet. If you don't get anybody by the end of next week, feel free to contact me. By then, I should be able to assist with making this mod. ~G7470 -
Agreed here with Veramis - your public-facing pages (login, signup) do not have an appealing design. On my desktop, it only fits half of my screen. If I scale it to a more mobile/tablet screen size, the text runs over the background image, so a lot of your text isn't even on the image anymore. So it's quite difficult for me to even get a sense of which device I should be using to play this game if this is what I see from the start. Remember, your public facing pages are your biggest assets. You want to draw them in - and believe me, this current design does not do that. ~G7470
-
You're right, x10 doesn't like 1 minute crons if you're using their free hosting. Paid hosting supports it. ~G7470
-
Yes, you need the records table in your database: CREATE TABLE records ( recid INT(6) AUTO_INCREMENT PRIMARY KEY, rec15 INT(6) NOT NULL DEFAULT 0, rec30 INT(6) NOT NULL DEFAULT 0, rec24 INT(6) NOT NULL DEFAULT 0, rec60 INT(6) NOT NULL DEFAULT 0 ); ~G7470
-
Sites like that aren't using them right now because as [uSER=65530]Coly010[/uSER] stated, they weren't established back then. And now, even if that code is still out there being used, they won't be going through a re-write to utilize a framework unless it is deemed to be absolutely necessary - cost versus benefit. Also, as [uSER=71663]IllegalPigeon[/uSER] stated, big frameworks are tested by thousands. Why try to reinvent the wheel with your own? You are much more prone to security holes creating your own framework than utilizing an existing one. ~G7470
-
I've dabbled in the Unity game engine and would certainly enjoy exploring this further with some assistance/feedback from the forum community as I go along. :) ~G7470
-
That's not what I suggested; it was just interpreted that way. I do agree, I don't think giving users the ability to create sections/categories is a good thing - I meant more along the lines of them creating topics and then gearing the sections/categories towards what sparks the users' interests so that those who know what they're talking about can weigh in appropriately. ~G7470
-
The timers won't be changing like they did with the Javascript - you're using a PHP function to accomplish this, so the timers will not keep changing. They will stay the same on the page until the page is refreshed. ~G7470
-
Where is the gettimeleft() function defined? I can't find it anywhere in your code. ~G7470
-
I agree with the majority of your statements; however, if categories are made for various different areas (whether that be for different languages or other mediums), there should be at least a couple of members who are quite knowledgeable in that area and can provide the proper tutorials and/or some help as needed for those who are asking for it. Part of the problem with many forums such as this are that the moderators and administrators try to go in a new direction by creating new categories, which is fine, but there is nobody that can provide any sort of content for it one way or another (whether that is a tutorial and/or support for those asking for help in that area), and thus, the category provides nothing constructive for the forum. Of course others that come along and find this forum may be able to provide feedback in those areas, but the chance of someone stumbling upon that and providing feedback in a reasonable amount of time are quite slim. My usual suggestion would be to see where the forum goes (allow content to be created fairly freely by anyone) and create/adjust categories accordingly, but as this is an older forum being revitalized, the best way (I feel) to handle it is to remove the unused categories (no topics/replies < 2 years old) and then build new categories as necessary. IRC has since been replaced for MWG (thanks to [uSER=52003]Dave Macaulay[/uSER]) so I think Dave was already working on something new for MWG in that regard. As for MCC, MCC may be "dead" to some, but to many, it is still a base platform for their game, and from what I can tell, it is still clearly being used (and talked about) quite often on here. Many people come here for help with MCC, which isn't exactly a bad thing, as many of us here have used MCC or are still using MCC. Without MCC continuing to be used and talked about, this forum would have most likely died a while ago. ~G7470
-
By "doesn't work", what exactly does that mean? ~G7470
-
Some suggestions/feedback from what I see: 1) Indentation - when reading code, it is very difficult to follow when the code is not indented in a way that is easy to read. Usually, the code inside of a {} block is indented within said block in order to quickly show other developers where the block starts and ends. 2) Try to avoid the large else {} blocks when possible as blocks that are larger than a normal desktop screen are difficult to follow. You could essentially end the page and exit if one of the validation checks fail. 3) Following with point 2, as of now, you're displaying that they can't do something (for example they're in the hospital), yet you're not preventing them from actually doing any of the actions on the page. 4) Be careful with setting columns to text without any sort of marker to indicate that it is in fact text. I see this in your code for hospreason. If that works, I'm honestly a little surprised, but nonetheless, surround that text with apostrophes or something to dictate it as such. And for a more advanced approach: 5) Set your error messages to an error variable. For example, something like this: $error = ' '; if($ir['hospital']){ // I do have line breaks after each of these error messages, just this code reader doesn't like them! $error .= "You can not rob a dealer while in the hospital. <br />" ; } if($ir['jail']){ $error .= "You can not rob a dealer while in the jail. <br />"; } if ($ir['rld'] != 0){ $error .= "You can only rob the local deals once a day.<br />"; } if($error <> ' ') { echo $error; $h->endpage(); exit; } This way, the user will see all of the error messages at once and will not keep trying over and over again with different error messages each time. 6) Initialize variables at the start of a code block where that variable will become useful. For example, on robdealer.php, you're setting the steal values at the beginning of the file, but if they didn't select an action yet, setting them is completely useless. Just keep that in mind. I know reading through this is a lot, but creating a mod in and of itself is a great start, and I commend you for that. Just take these suggestions into consideration for updating this mod as well as for future mods and/or code that you write. :) ~G7470
-
This might not exist as a mod, but this can easily be changed with the current files that you already have. In item_use.php, instead of just using 1, ask for a quantity, and THEN use the item(s). That shouldn't be too bad. ~G7470
-
The exploits listed here (I'm sure) exist on RC Engine as well. ~G7470
-
These "Undefined index" errors/notices are because that index is not set before you are checking its value. As you (probably) don't want to actually set this value until you need to, you have to check if it is set or not before checking its value in any way. So, for example, this error: "Notice: Undefined index: logout in /home1/worldcri/public_html/index.php on line 18" can be fixed by doing the following: if (isset($_GET['logout']) && strip_tags($_GET['logout']) == "true") { See that I'm checking whether or not it is set first before accessing its value. That's how you can remedy those errors. ~G7470
-
I currently have 1 Linux box running HaikuOS. I currently have an old laptop looking for a new OS...I'll probably put Haiku on that one as well. ~G7470
-
Wherever you have this similar code (from lines 533-571): <img src='images/bar_somecolor.jpg' width = '".(140-$somevar)."' height = '5px'> Replace with: <img src='images/bar_somecolor.jpg' width = '".(100-$somevar)."' height = '5px'> It will make the bars themselves smaller in width, but it will remove that red area you see when those are full. Hope this helps! ~G7470
-
Heck, could I get paid using the blog posts that I've been doing for very similar purposes? I publish them on an almost weekly basis as it is for free. I post them on MWG here: http://makewebgames.io/blog.php/70485-G7470 ~G7470
-
You can refer to my most recent blog post - it lists a few project management tools, but I'm sure you could find others if these do not fit your needs: http://makewebgames.io/entry.php/700-Importance-of-Project-Planning-Part-2 ~G7470
-
A quick glance shows that if you are not storing attack information in the users table, then simply using $ir['attacking_won'] to get "attacks won" won't work for you. Same goes with the other attack information variables there. You have to (at least) reference the data that you were originally using to generate this information. This is what you were originally doing to do so: $attacks_won = $db->query(sprintf('SELECT COUNT(`log_id`) AS attacking_won FROM `attacklogs` WHERE `attacker` = %u AND `result` = "%s"', $userid, 'won')); $attacks_wonc = $db->fetch_row($attacks_won); $attacks_lost = $db->query(sprintf('SELECT COUNT(`log_id`) AS attacking_lost FROM `attacklogs` WHERE `attacker` = %u AND `result` = "%s"', $userid, 'lost')); $attacks_lostc = $db->fetch_row($attacks_lost); if ($attacks_lostc['attacking_lost']) { $attacking_perl = $attacks_lostc['attacking_lost'] / ($attacks_wonc['attacking_won'] + $attacks_lostc['attacking_lost']) * 100; } elseif (!$attacks_lostc['attacking_lost']) { $attacking_perl = 0; } if ($attacks_wonc['attacking_won']) { $attacking_perw = $attacks_wonc['attacking_won'] / ($attacks_wonc['attacking_won'] + $attacks_lostc['attacking_lost']) * 100; } elseif (!$attacks_wonc['attacking_won']) { $attacking_perw = 0; } $attacksd_won = $db->query(sprintf('SELECT COUNT(`log_id`) AS defending_won FROM `attacklogs` WHERE `attacked` = %u AND `result` = "%s"', $userid, 'lost')); $attacksd_wonc = $db->fetch_row($attacksd_won); $attacksd_lost = $db->query(sprintf('SELECT COUNT(`log_id`) AS defending_lost FROM `attacklogs` WHERE `attacked` = %u AND `result` = "%s"', $userid, 'won')); $attacksd_lostc = $db->fetch_row($attacksd_lost); if ($attacksd_lostc['defending_lost']) { $defending_perl = $attacksd_lostc['defending_lost'] / ($attacksd_wonc['defending_won'] + $attacksd_lostc['defending_lost']) * 100; } elseif (!$attacksd_lostc['defending_lost']) { $defending_perl = 0; } if ($attacksd_wonc['defending_won']) { $defending_perw = $attacksd_wonc['defending_won'] / ($attacksd_wonc['defending_won'] + $attacksd_lostc['defending_lost']) * 100; } elseif (!$attacksd_wonc['defending_won']) { $defending_perw = 0; } $T_won = $attacks_wonc['attacking_won'] + $attacksd_wonc['defending_won']; $T_lost = $attacks_lostc['attacking_lost'] + $attacksd_lostc['defending_lost']; if ($T_won) { $T_won_per = $T_won / ($T_won + $T_lost) * 100; } elseif (!$T_won) { $T_won_per = 0; } if ($T_lost) { $T_lost_per = $T_lost / ($T_won + $T_lost) * 100; } elseif (!$T_lost) { $T_lost_per = 0; } Once you understand what this snippet of code here is doing, you should be able to see what variables should go where in the new index file in order to display it properly. ~G7470
-
Oops, I guess I didn't say it right..haha. Looks nice, but what does your index.php code currently look like? ~G7470