Quote:
Originally Posted by xCataluna
Thank you so much, it works! ^___^
But I have one more wee problem. When I moved it, it stopped displaying the promocode for the current level, now its displaying the one for the next level. And changing $nextlevel to $currentlevel in the query has no affect. o_o
What am I doing wrong?
|
I am not sure why it would do that; However looking back and your first post and understanding the problem more I suggest this.
On line 165 or before "// Show a thank you message along with the adoptable's information to the user..."
Check if it is the right type of adoptable then add in this query since we dont know if the pet leveled up or not and grab the $currentlevel
sql: "SELECT * FROM ".$prefix."owned_adoptables WHERE aid='$id'";
get: $currentlevel
then query to get the $promocode
sql: "SELECT * FROM ".$prefix."levels WHERE adoptiename='$type' and thisislevel='$currentlevel'"
get: $promocode
then build the link and display it I would recomend at
Code:
$article_content = $article_content . "<div align='center'><br />You have earned ". grabanysetting('rewardmoney') ." ". grabanysetting('cost') ." for leveling up this adoptable. <br />You now have {$GLOBALS['money']} ".grabanysetting('cost')."</div>";
Quote:
Originally Posted by xCataluna
Edit: I moved the code down to the bottom, as part of the OUTPUT PAGE section.
|
I dont recomend putting any code outside of the error/if checking you get more bugs or possible exploits
side note:
bugs that I have notticed about leveling up,
if you are logged out and click on the pet then log in you can click again but not the other way around.
why is it showing you earned money when you are a visitor and not logged in?
You could add a hook and suggest if you had been logged in/ sign up you could have earned that money.