-
Posts
2,921 -
Joined
-
Last visited
-
Days Won
48
Content Type
Profiles
Forums
Events
Everything posted by KyleMassacre
-
mccode-v2 Paypal/donation package creation.
KyleMassacre replied to Gungneer's topic in Free Modifications
Doesn't that already show everything? -
mccode-v2 Paypal/donation package creation.
KyleMassacre replied to Gungneer's topic in Free Modifications
It would be better. This way it would be easier to expand on and do what you want -
mccode-v2 Paypal/donation package creation.
KyleMassacre replied to Gungneer's topic in Free Modifications
Well if I were you I would add some sort of pivot table or intermediate table much like Eloquent does: Packages Table Structure -id (int) -name (string) -price (double/float) Package Contents table -package_id (int) -money (int) -crystals (int) //if you have an unidentified amount of items to add and serialize the items into here -items (text/blob) //If you only want a select number of items -item1...5 (int) -item1...5_qty (int) Items Table -default setup Now you can join these three tables together with the id from the packages table to the package_id from the package contents table and the item_id from the contents table to items id from the items table -
mccode-v2 Player Purchasable Ads
KyleMassacre replied to TheMasterGeneral's topic in Free Modifications
It's because it's checking those post keys before anything has been posted through the form. Arrays must be checked one way or another before being used. Depending on what you are looking for there are a couple of functions you can use. 1. isset(): Exactly what the function name says. It checks to see if a value is set to that array. 2. array_key_exists(): Checks to see if a key has been set to the array. i.e $array['key'] = 'value'; For when you come across the terminology key value pair or key => value pair. And more but these are the most used from what I have seen. And as you can see from the code (which is another argument I have seen) is that you are calling the global variable $_POST and assigning it a value before checking it. I could give you the answer on how to fix those but I want you to learn for yourself. But here are somethings to look for: 1. Do you want to check if a value is set to an array, or do you want to see if an array key exists? 2. Do you want to overwrite the global variable $_POST with data since PHP knows that it should be looking for data posted during run time? For me personally I would do something that had a mix of all of this: $postData = (isset($_POST['data']) && array_key_exists('data',$_POST)) ? $_POST['data'] : NULL; //To avoid other arguments here I will allow you to validate/sanitize data where you wish or if you wish -
Yeah I didn't mean less than zero lol. But you can't divide by zero hence your error. In regards to issue of not going over 100%, it doesn't matter 310% is the same as 100%. You just work out the calculations like MTG showed you can see what you may expect.
-
mccode-v2 Paypal/donation package creation.
KyleMassacre replied to Gungneer's topic in Free Modifications
If you click the quote button you can see the SQLs -
Well, you shouldn't even be using MySQL to begin with since its outdated and vulnerable to injections a lot more. If you open your config.php file you will see the $_CONFIG array: $_CONFIG = array( 'hostname' => 'localhost', 'username' => 'root', 'password' => 'root', 'database' => 'originalmcc', 'persistent' => 0, 'driver' => 'mysqli', // <- This is what you want to change to 'code' => 'mysupersecretcodeishere', ); Just change the driver from mysql to mysqli and you should be in business
-
I think it is because that .92 is less than zero. I have never been a big fan of this approach, I guess its to make it more dynamic but just putting in a number for it makes life a lot easier. Also, makes crimes tougher for all the stat whores out there
-
Well pick a problem you are having and stick with that for the time being. I gave you two solutions and both should work for your two problems. What is your current issue? Is it the $argc or the deprecation notice?
-
Easy to fix, go to your config file and change mysql to mysqli. This error should not stop anything from working though since it is just a notice
-
Nope and that is likely the error that is stopping it from running
-
Well let me talk about it in a little bit more detail because it's going to take more than one person for me to release it to the public ;) This application uses JWT (JSON Web Tokens) to handle authentication. By default it's set to not expire until the user decides to logout of the application. There is an environment variable to change this if you wish to set a TTL (Time To Live) on it. As far as th App developer is concerned they just need to pass in the token with each request either in the header or as a query string. As you can see from the sample data that is returned with the users information, it shows pretty much all relevant data that you would need for like a "header" or "index" page with some mutators to make life easy on the developer. For example, it uses some of the Carbon lib to parse timestamps to human readable form along with the actual timestamp as well. There are other mutators for the stats to which are just like a simple number format, money formatter for currency and percentages for the stats. Reminder for myself: Make percentages also go from 0-1 because swift likes those for things like bars For the messages it shows a paginated result set and it shows basic info like subject, is it read yet, time sent, who sent it. But like I said, I may open source it but if not I may put it up for like $20-$30 bucks. This also comes with a pretty neat module system to expand it some more made by Ping Pong Labs which with one simple artisan command you have everything generated for you that you will need. This is made using Laravel, I could have used Lumen for it but things just work better on Laravel otherwise I would have to change a lot of libraries around and the whole app would mess up if you ran an update through composer.
-
No it's just an API to port over your game to a mobile platform. Ideal for Swift, Obj-C, Phone Gap, Cordova, etc
-
Here is a little something from the readme: https://stackedit.io/viewer#!provider=gist&gistId=5af21db29def70f1c534&filename=MCC-API
-
Hello all, Don't know if anyone is interested but I am making an API (basic) for MCC V2. Currently it supports logging in (I need to do registration), viewing your own player data, and messages (reading/composing). Also I am making some extra plugins for it as I see fit and currently have banking created. If anyone is interested I may open source it if there is a great enough response about it.
-
You can probably just remove that and just check the config code. Replace that snippet with this: if(!isset($_GET['code']) || $_GET['code'] !== $_CONFIG['code']) exit; I dont really understand what that is. I just checked my copy of globals and non_auth and cant find it
-
mccode-v2 Player Purchasable Ads
KyleMassacre replied to TheMasterGeneral's topic in Free Modifications
You get the fatal error because $h is not included in the global list of variables inside the function and for the undefined indexes, that is exactly what the error says. Its not being checked if it exists before being used. -
You can take a look at something like this: http://www.jacklmoore.com/notes/jquery-tabs/ for a start
-
Do you mean something like using jquery panels?
-
mccode-v2 Player Purchasable Ads
KyleMassacre replied to TheMasterGeneral's topic in Free Modifications
If you click the reply button the SQL will show up -
Can you please re post this and use code tags? For whatever reason a lot of the bbcode tags don't work
-
Oops don't even know why I said that just thinking backwards. If your on a production machine then yeah turn reporting off. But if your still in dev mode I wouldn't know why people through it up on a live server anyways
-
It's because it's looking for $_POST['ID'] and not $_POST['id']
-
abs() is a function and (int) is a type for typecasting your value. It looks like to me it's supposed to be:
-
Pretty much Just remember, you can't use it all he time because the 2 functions check for different things. isset() will check to make sure that there is a value for the most part and array_key_exists() checks to see if there is a key in the array.