KyleMassacre Posted February 13, 2016 Share Posted February 13, 2016 Don't forget to add $lottoconfig to your functions as a global Quote Link to comment Share on other sites More sharing options...
-BRAIDZ- Posted February 13, 2016 Author Share Posted February 13, 2016 Okay so add the call global at the start of each case then? Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted February 13, 2016 Share Posted February 13, 2016 No, in your function: function lotto() { global $lottoconfig; //... } function buy() { global $lottoconfig; //... } Quote Link to comment Share on other sites More sharing options...
-BRAIDZ- Posted February 13, 2016 Author Share Posted February 13, 2016 That's what I meant, now getting 500 error and this is the error from a syntax check I done if($lottoconfig['pagedisable'] == 'Yes' &&$pl['playerid'] != 1) PHP Syntax Check: Errors parsing your Error on line 16: parse error, unexpected T_STRING( )! http://pastebin.com/jEmyWjm4 Quote Link to comment Share on other sites More sharing options...
AdamHull Posted February 13, 2016 Share Posted February 13, 2016 Running this through a syntax checker I do not get any errors, you may want to run your code through a php beautifier (find on Google) as you seem to have a lot off white space which could be causing you issues. Also you do not need $h or $q__ry globalised ($h as it is a mccodes functions and $q__ry as you are setting this within the function) Quote Link to comment Share on other sites More sharing options...
-BRAIDZ- Posted February 13, 2016 Author Share Posted February 13, 2016 This is what I have now, no 500 error, buts still displaying nothing http://pastebin.com/daiHx13G And I have ran it through a php beautifier Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted February 13, 2016 Share Posted February 13, 2016 You have some sort of error. Try turning on error reporting Quote Link to comment Share on other sites More sharing options...
-BRAIDZ- Posted February 13, 2016 Author Share Posted February 13, 2016 You have some sort of error. Try turning on error reporting Displaying no errors Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted February 14, 2016 Share Posted February 14, 2016 There has to be. error_reporting(E_ALL); Quote Link to comment Share on other sites More sharing options...
-BRAIDZ- Posted February 14, 2016 Author Share Posted February 14, 2016 There has to be. error_reporting(E_ALL); That's what I used and no errors Quote Link to comment Share on other sites More sharing options...
-BRAIDZ- Posted February 14, 2016 Author Share Posted February 14, 2016 Only thing I can think of is the whole mod needs recoding from scratch Quote Link to comment Share on other sites More sharing options...
NonStopCoding Posted February 15, 2016 Share Posted February 15, 2016 (edited) 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); } its nothing to do with the way the query's are you made a mistake when converting mysql_fetch_single // would need to be changed to mysql_fetch_assoc // or you can use mysql_fetch_row Edited February 15, 2016 by NonStopCoding Quote Link to comment Share on other sites More sharing options...
-BRAIDZ- Posted February 15, 2016 Author Share Posted February 15, 2016 its nothing to do with the way the query's are you made a mistake when converting mysql_fetch_single // would need to be changed to mysql_fetch_assoc // or you can use mysql_fetch_row Still nothing Quote Link to comment Share on other sites More sharing options...
AdamHull Posted February 15, 2016 Share Posted February 15, 2016 If I can get hold off a copy of rc I will recode this to work Quote Link to comment Share on other sites More sharing options...
NonStopCoding Posted February 15, 2016 Share Posted February 15, 2016 Still nothing $count = mysql_query("SELECT COUNT(`user`) FROM `lottery_players` AS `players`"); $amt = mysql_fetch_row($count); // then change the money_formatter function to the one below. Tickets Purchased: ".number_format($amt['players'], '')." There is also another one like this in the other functions. Quote Link to comment Share on other sites More sharing options...
NonStopCoding Posted February 15, 2016 Share Posted February 15, 2016 Still nothing errors i got when running it on rc Warning: mysql_fetch_row() expects parameter 1 to be resource, boolean given in /home/nonstopc/public_html/rc/lottery.php on line 25 Warning: number_format() expects parameter 2 to be long, string given in /home/nonstopc/public_html/rc/lottery.php on line 31 Warning: number_format() expects parameter 2 to be long, string given in /home/nonstopc/public_html/rc/lottery.php on line 35 Warning: number_format() expects parameter 2 to be long, string given in /home/nonstopc/public_html/rc/lottery.php on line 36 Quote Link to comment Share on other sites More sharing options...
NonStopCoding Posted February 15, 2016 Share Posted February 15, 2016 (edited) Fixed up some issues http://pastebin.com/HTrzqEDB Full Working Version with some code edits: http://pastebin.com/RQfSKJmp Edited February 15, 2016 by NonStopCoding Quote Link to comment Share on other sites More sharing options...
-BRAIDZ- Posted February 16, 2016 Author Share Posted February 16, 2016 Fixed up some issues http://pastebin.com/HTrzqEDB Full Working Version with some code edits: http://pastebin.com/RQfSKJmp Awesome thank you. Now time to test it. would there be any edits I'd have to make to the lottery config? Quote Link to comment Share on other sites More sharing options...
NonStopCoding Posted February 16, 2016 Share Posted February 16, 2016 Awesome thank you. Now time to test it. would there be any edits I'd have to make to the lottery config? nope just lottery.php Quote Link to comment Share on other sites More sharing options...
-BRAIDZ- Posted February 16, 2016 Author Share Posted February 16, 2016 nope just lottery.php Okay where will I put the lottery configuration? Because my tickets price and everything isn't showing up. Quote Link to comment Share on other sites More sharing options...
NonStopCoding Posted February 19, 2016 Share Posted February 19, 2016 the code for the config file i placed it in includes/style_top.php Quote Link to comment Share on other sites More sharing options...
-BRAIDZ- Posted February 21, 2016 Author Share Posted February 21, 2016 the code for the config file i placed it in includes/style_top.php Okay thanks where abouts in that File? I did try put it in includes/brain_file.php but didn't work Quote Link to comment Share on other sites More sharing options...
NonStopCoding Posted February 21, 2016 Share Posted February 21, 2016 Okay thanks where abouts in that File? I did try put it in includes/brain_file.php but didn't work did you even read what i posted? it has the location and the filename Quote Link to comment Share on other sites More sharing options...
-BRAIDZ- Posted February 21, 2016 Author Share Posted February 21, 2016 did you even read what i posted? it has the location and the filename I didn't read it. I asked where abouts in the style_top.php file because I have placed it in there, and it still returning all zero Quote Link to comment Share on other sites More sharing options...
-BRAIDZ- Posted March 4, 2016 Author Share Posted March 4, 2016 Still haven't figured it out Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.