Legaci Posted June 16, 2013 Posted June 16, 2013 ive looked at this code for over an hour and i am not seeing anything wrong with this spent a good few hours building this mod :/ Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/bravelan/public_html/clottery.php on line 28 } if($_GET['a'] == buy) { if($ir['crystals'] < 25) { die("You don't have enough crystals"); }$tick = 1; $tickq = $db->query("SELECT * FROM `clottery` WHERE `userid` = '$ir['userid']'"); if($db->num_rows($tickq) > $tick) { die('You can only purchase ' .$tick. ' tickets maximum'); } echo' You purchased a Crystal lottery ticket'; thanks to you that help!!! Quote
Dragon Blade Posted June 16, 2013 Posted June 16, 2013 (edited) } if($_GET['a'] == buy) { if($ir['crystals'] < 25) { echo"You don't have enough crystals"; $h->endpage(); exit; } $tick = 1; $tick1 = $db->query("SELECT * FROM clottery WHERE userid= $userid"); if($db->num_rows($tick1) > $tick) { echo"You can only purchase ' .$tick. ' tickets maximum"; $h->endpage(); exit; } } else { echo"You purchase a crystal lottery ticket"; $h->endpage(); exit; } Not sure if it will work. Edited June 16, 2013 by Dragon Blade Quote
Dayo Posted June 16, 2013 Posted June 16, 2013 i fixed it i found the error ;) care to share the fix as it may help other people doen the line if they get the same or a similar error Quote
SRB Posted June 16, 2013 Posted June 16, 2013 took a whole 2 seconds: if($_GET['a'] == buy) to if($_GET['a'] == "buy") Simples Quote
Octarine Posted June 16, 2013 Posted June 16, 2013 2 seconds .. what did you do? Stop and make a cup of tea midway? :P Oh and BTW, you missed at least one other problem :D - - - Updated - - - 2 seconds .. what did you do? Stop and make a cup of tea midway? :P Oh and BTW, you missed at least one other problem :D Quote
SRB Posted June 16, 2013 Posted June 16, 2013 2 seconds .. what did you do? Stop and make a cup of tea midway? :P Oh and BTW, you missed at least one other problem :D - - - Updated - - - 2 seconds .. what did you do? Stop and make a cup of tea midway? :P Oh and BTW, you missed at least one other problem :D Never looked past that one, but will look now... also, IRC, mofo :P Quote
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.