Jump to content
MakeWebGames

Recommended Posts

* Fixed some minor issues in code *

This is my most recent module decided to release it for free hope you enjoy.

Okay so first off the sql files.

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

now create a file called drugmarket.php and insert this code

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

Will be adding new features to this soon any issues or bugs let me know.

oh almost forgot you need a js library for the ajax to work 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Edited by NonStopCoding
  • Like 2
Link to post
Share on other sites

Not bad but just a few things I noticed. I will assume this is GRPG??? If it is, I’m not in tune with it too much but last I checked, did they have a database class or was it straight procedural? This does look like it could be MTG’s PDO class. Also in your Message function, is that a default constant that is being used or is that an added feature as well?

Link to post
Share on other sites
1 hour ago, Magictallguy said:

I've avoided tagging the gRPG posts with the same tags as MCC because I figured that'd confuse things down the road.
Speaking of which.. @Dave, wut are we doin' with the gRPG tags? Thar be 2 versions (and I've been quietly planning a MongoDB release, but shhhh)

Let's work out a plan in PM!

  • Like 1
Link to post
Share on other sites
  • 2 years later...
20 hours ago, athena26 said:

What do I have to convert ..teach me. 

 I've not worked with grpg before but I do have experience in MCC, so please bare that in mind as you continuing reading my reply 😅

The conversion would take place in drugmarket.php, the SQL seems applicable to both engines.

To go from grpg to mcc yourll need to make sure your globals or global func file is included rather than the Inc/header

The queries within this script will need to be rewritten to mcc requirements, Ie I'm not sure mcc supports what I call class queries ($drug = $db->fetch(true);) so yourll have to run these checks for money and quantity slightly different, calling the fields from the database and running then through an if statement or boolean ((x=1) ? true: false)) statement

Yourll have to check that any functions used (ie. prettynum(integar)) are declared in your global func or make a similar function or use pre existing PHP functions (number_format, round etc)

To be honest, that was all a guess based off historic experience so do let me know how it goes/if this is helpful/correct in anyway 😁

Should be a good start for you anyway

 

 

 

 

 

 

  • Like 1
Link to post
Share on other sites
2 minutes ago, athena26 said:

I've replaced

 

include "globals.php"; 

 

However now I'm getting a blank page .

Check your error log, either that or the there's a query queriering something that doesn't exist

Link to post
Share on other sites
  • 3 weeks later...
On 5/14/2021 at 1:23 PM, athena26 said:

Does this work for mccodes v2?

I have a much more advanced version for mccodes on store.. 

but yes would need converted wouldn't be hard at all being honest.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...