Jump to content
MakeWebGames

[mccode] My First MOD EVER!!! Need help..think there is big time mistakes...


Poldar

Recommended Posts

Hey all..I just made my first modification..but I dont know if it is right..

So if you could help me out..and point out some big mistakes..

Dont be to harsh please.I just started getting into PHP like a week ago..

Thanks much

Mod is supposed to do a little pop ip box...

and ad $1 to the users money

 

You're unable to view this code.

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

 

Thanks much

Link to comment
Share on other sites

Re: My First MOD EVER!!! Need help..think there is big time mistakes...

Your getting there POLDER :) havent tested the script but by looking at it, the script puts money into an account when a button is pressed on a thursday..

Few pointer though.. just to keep you on the right track... :)

Always put HTML at the end of a script as sometimes you will find it conflicting with the global_func.php

When closing out a php the ?php> is not needed just a simple ?> will do..

The table for your USER should be USERS i make that mistake quite alot as well...

But for a first attempt your doing Okies....

What i usualy do is look at already coded scripts and just alter things on trial and error to see the outcome if it dont work just revert it bak to how it was and have another go..

You will start to pick it up quite fast that way.

Link to comment
Share on other sites

Re: My First MOD EVER!!! Need help..think there is big time mistakes...

You werent way off, you arnt familiar with mixing php / html / javascript into one. And the mccode base + querys.

Lol in my script i misses a s in the query:

 

You're unable to view this code.

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

 

Should be:

 

You're unable to view this code.

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

Link to comment
Share on other sites

Re: My First MOD EVER!!! Need help..think there is big time mistakes...

 

You're unable to view this code.

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

 

I see what you did..you added variables so that you could randomize the script when ever you want...

How would we randomize the money given?

something like

ran. money_give >100?

or something?

Link to comment
Share on other sites

Re: My First MOD EVER!!! Need help..think there is big time mistakes...

To randomise the money give out, change:

$money_give = 900; to

$money_give = rand(600,900); :)

 

Nice little mod here. +1 from me for the effort. You'll get the hang of PHP quite quickly. I've been coding for around 1-2 months now and have grasped all of the basics. :)

Link to comment
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...