![]() |
Store add-on - remove warning points - help needed!
G'day all,
I tried modifying a few existing hacks to create an add-on for Lesane's store wherein a user could pay to have a warning point removed (from g-force2k2's Warning Hack), but I've hit a snag wherein the check to see if a user has any points and giving them an error screen if they don't isn't working. Here's the code: Code:
$warns = $DB_site->query_first("SELECT warninglvl FROM user WHERE userid='$bbuserinfo[userid]'"); Also, here's the code I've got for removing the point. Not sure if it works or not as I haven't got that far, but comments would be appreciated, thanks! Code:
if ($cost>$points) { |
PHP Code:
|
Thanks N9ne, it came up with the warn_error template, but I got this error at the top of the page:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in db_mysql.php on line 149 |
What's line 149?
|
Code:
$this->record = mysql_fetch_array($this->query_id); |
N9ne why are fetching the array again. Query first does all the hard work for you ;)
Try this: PHP Code:
|
Cool, that did it, thanks guys! :)
I'll write this up and post it in the Beta hacks forum, with thanks to you both, of course! |
Your Welcome :)
|
All times are GMT. The time now is 03:29 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|