Jump to content
MakeWebGames

dauninge

Members
  • Posts

    4
  • Joined

  • Last visited

dauninge's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. OK, I have it working. Sort of. I changed it to:   OUT;   if($upgrade == "Y") { return "upgrade"; } { print"<a href=upgrade.php>[upgrade]</a>"; } Now the code works and prints the [upgrade] button/option. BUT, it also works if I do this: <img src=greenbar.png width=$hpperc height=10><img src=redbar.png width=$hpopp height=10> <a href=upgrade.php>[upgrade]</a> <hr />   OUT; (totally removed the if($upgrade == "Y") { return "upgrade"; } So, it seems the problem is the if($upgrade == "Y") is not working the way it should, as the upgrade button is always there, and returns the statement "you don't have enough experience to upgrade" when you don't have enough exp. If you do have the required exp, it upgrades you, but I thought the idea of the statement was to only print the option IF there was enough experience to upgrade.
  2. I tried that before, moving it below the OUT;, but went ahead and did it again. The code still works, but does not print the [upgrade] option anywhere. I did make sure that my exp level is above 100%, so the option should appear, but it is not printing. Thanks!
  3. OK, Here is a bit more than 10 lines above and below, but just in case. I changed the location of the code to under the health status bar. I am not sure how to not echo the section. I am pretty sure I need it in a different place, or another command? Sorry, I am a noob, but trying to learn. I do appreciate the responses and any help. print <<<OUT <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="20%" bgcolor="#$bgcolor" valign="top"> Name: $gn{$u} [{$ir['userid']}] $d Money: {$fm} Level: {$ir['level']} Crystals: {$ir['crystals']} [Emergency Logout] <hr /> Energy: {$enperc}% <img src=greenbar.png width=$enperc height=10><img src=redbar.png width=$enopp height=10> Will: {$wiperc}% <img src=bluebar.png width=$wiperc height=10><img src=redbar.png width=$wiopp height=10> Brave: {$ir['brave']}/{$ir['maxbrave']} <img src=yellowbar.png width=$brperc height=10><img src=redbar.png width=$bropp height=10> EXP: {$experc}% <img src=navybar.png width=$experc height=10><img src=redbar.png width=$exopp height=10> Health: {$hpperc}% <img src=greenbar.png width=$hpperc height=10><img src=redbar.png width=$hpopp height=10> <hr /> if($upgrade == "Y") { print"<a href=upgrade.php>[upgrade]</a>"; } OUT; if($ir['fedjail']) { $q=$db->query("SELECT * FROM fedjail WHERE fed_userid=$userid"); $r=$db->fetch_row($q); die("<font color=red size=+1>You have been put in the {$set['game_name']} Federal Jail for {$r['fed_days']} day(s). Reason: {$r['fed_reason']}</font></body></html>"); } if(file_exists('ipbans/'.$IP)) { die("<font color=red size=+1>Your IP has been banned from {$set['game_name']}, there is no way around this.</font></body></html>"); } } function menuarea() { include "mainmenu.php"; global $ir,$c; $bgcolor = 'FFFFFF'; print '</td><td width="2" class="linegrad" bgcolor="#'.$bgcolor.'"></td><td width="80%" bgcolor="#'.$bgcolor.'" valign="top"> <center>'; if($ir['hospital']) { print "NB: You are currently in hospital for {$ir['hospital']} minutes. "; } if($ir['jail'])
  4. Regarding this mod from Beton: [mccode v2] Advanced(isher) Level Upgrade Mod. I followed the instructions for this Level Upgrade Mod, and it works, but I have a small problem that I can't figure out. When I put this in the header file (I put it above the Name field) : if($upgrade == "Y") { print"<a href=upgrade.php>[upgrade]</a>"; } On my home page it prints above my name: if( == "Y") { print"[upgrade]"; } The upgrade link works, but I only want it to print [upgrade] and not the code part. I'm trying to learn PHP, but just starting, so any help is appreciated. Maybe I have it in the wrong place? Thanks!
×
×
  • Create New...