Jump to content
MakeWebGames

Recommended Posts

Posted

I have been trying to convert it for RC Engine, and I have not been successful, I tried changing all the queries to suit RC engine, but nothing it just gives me a blank Page and only shows my stats, like my happiness, my nerve,my energy, just nothing with the actual mod

Posted

I will post it sometime soon using my phone at the moment as I have no internet connection till between Tuesday and Thursday next week.

Then I'll be away on Thursday for 5-6 days.

The mod works on crappy ravens when I was using that.

I might even try some more debugging myself

Posted
Provide the all the code related to the mod that you have.

Your problem sounds like a syntax error, but we'll need to see the code to find it

Here's what I have done to try and convert it and this is what I'm getting

_20160211_171649.thumb.JPG.a00904b159a592df1cf32db3bd3728ed.JPG

Posted

Here's what I have done to try and convert it and this is what I'm getting

Like I said, seems like a syntax error. I'll need to see the code to help.

What do you use to write your PHP code?

Posted

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):

  1. 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.

  2. 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.
  3. 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

Posted

[uSER=67703]adamhull[/uSER] is on to something here. You need to remove the global variables that you are using in your functions since RC (from what I remember) doesn't use the $db, $ir, $set variables so most likely you are getting undefined variable errors

Posted

Could it be the way the queries are set out?

Because if you take notice they are a heap different to RC I've only charge it from $db->query to myself_query.

So it could just be the was they are set out, as RC engines queries are set out as such..

$q_ry = array();
$q_ry = "INSERT INTO `members_items`
        VALUES ('NULL',
                '".mysql_real_escape_string($item_number)."',
                '162',
                '".mysql_real_escape_string($payment_qty)."')";
mysql_query($q_ry);
}
Posted
Update on your code?

I added this

echo "


               Lottery

               ";
if ($pl['my_jail'] > time() || $pl['my_hosp'] > time()) {
   echo "Sorry this page is not viewable while in jail or hospital!
            ";
} else {

Just to see if the head main would show.

I have gotten rid of the calling of global at the start of each function and changes $ir to $pl and still no difference, I the first query to see if that would help but it didn't, not sure if I done it correctly though.

I did write a comment before with a paste of what I had done

Posted
echo "


               Lottery

               ";
if ($pl['my_jail'] > time() || $pl['my_hosp'] > time()) {
   echo "Sorry this page is not viewable while in jail or hospital!
            ";
} else {

That's what I added as it's removing & in my previous comment

Posted

This there is an error, I'm typing stuff and it's not showing in my comments...

And I'm not sure I'll have a look to see if money formatter is or isn't, but I don't think it is

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...