Current location: Hot Scripts Forums » Programming Languages » PHP » GRRR!!!! ERror help please!


GRRR!!!! ERror help please!

Reply
  #1 (permalink)  
Old 12-04-06, 07:49 PM
stormshadow's Avatar
stormshadow stormshadow is offline
Coding Addict
 
Join Date: Mar 2005
Posts: 355
Thanks: 0
Thanked 0 Times in 0 Posts
GRRR!!!! ERror help please!

PHP Code:

if($step == "fightsim"){

        if(
$playerinfo[trains] > 0){        
        
$select_player mysql_query("select * from sim_characters where level='$lvl'") or die(mysql_error());
        if(
mysql_num_rows($select_player)<=0){
            echo
"Trainer could not be found.";
            include(
"$playerinfo[scheme_footer]");
            exit();
        }
        
$row mysql_fetch_array($select_player);
        if (
$row[life] <= 0){ echo "$row[username] is already knocked out, so you just kick him several times for a laugh.";
        }else {
        if (
$playerinfo[life] <= 0){ echo "You already feel woOoSy... You can't fight him.. you dont feel well enough.. Maybe you should visit the <a href=\"hospital.php\">doctor</a>";
        }else {        
        echo
"1: ";
            if(
$playerinfo[agility]>$row[agility]){
                
attack('playerinfo');
            }elseif(
$row[agility]>$playerinfo[agility]){
                
attack('row');
            }else{
                if(
rand(1,2)==1){
                    
attack('playerinfo');
                }else{
                    
attack('row');
                }
//draw?
            
}//who first?
        
        
$line 1;
        while(
$playerinfo[life]>&& $row[life]>&& $line<501){
            
$line++;
            
$speedmod rand(($playerinfo[agility]/3),$playerinfo[agility]);
            
$speedmod = ($speedmod/$row[agility]);
            if(
$speedmod>.6){
                echo
"$line: ";
                
attack('playerinfo');
            }else{
                echo
"$line: ";
                
attack('row');
            }
        }
        
$date_now date("m\/d H:i T");
        
$stamina_new1 $playerinfo[trains] - 1;
        if(
$playerinfo[life]>0){
        
$win_new1 $playerinfo[wins] + 1;
            
            if (
$row[level] < ($playerinfo[level])) {
            
$exp_disp = (10 $row[level]);
            
$exp_new1 $playerinfo['exp'] + (10 $row[level]);
            }else if (
$row[level] > $playerinfo[level]) {
            
$exp_disp = (20 $row[level]);
            
$exp_new1 $playerinfo['exp'] + (20 $row[level]);
            }else{
            
$exp_disp = (15 $playerinfo[level]);
            
$exp_new1 $playerinfo['exp'] + (15 $row[level]);
            }
 
            
$stamina_new1 $playerinfo[trains] - 1;                
            
$update_win1 mysql_query("update member set exp='$exp_new1', life='" intval($playerinfo[life]) . "', trains='$stamina_new1' where email='$email'") or die(mysql_error());
            
$update_simchar1 mysql_query("update sim_characters set life=newlife WHERE level='$row[level]'") or die(mysql_error());
            echo 
"You defeated $row[username]. Awarded <b>$take_final</b> Dollars and <B>" $exp_disp "</B> Experience<br>";
            
    
$res mysql_query("SELECT * FROM member WHERE email='$email'") or die(mysql_error());
    
$playerinfo mysql_fetch_array($res);
    
mysql_free_result($res);
        }elseif(
$row[life]>0){
        
$loss_new2 $playerinfo[loses] + 1;
        
        
$stamina_new2 $playerinfo[trains] - 1;

        
$update_win2 mysql_query("update sim_characters set life=newlife where level='$row[level]'") or die(mysql_error());
        
$update_loss2 mysql_query("update member set life='0', trains='$stamina_new2' where email='$email'") or die(mysql_error());


        echo 
"<br>You lost to $row[username].<br>";
$res mysql_query("SELECT * FROM member WHERE email='$email'") or die(mysql_error());
$playerinfo mysql_fetch_array($res);
mysql_free_result($res);
            }else{
            echo
"After a long fight. You both decided that it is too much. And that you are both equal.";
            
$update_win1 mysql_query("update member set life='" intval($playerinfo[life]) . "', trains='$stamina_new1' where email='$email'") or die(mysql_error());
            
$update_simchar1 mysql_query("update sim_characters set life=newlife WHERE level='$row[level]'") or die(mysql_error());
        }

                                    if(
$playerinfo['exp'] >= $playerinfo[newexp]){
                                    
$level_new $playerinfo[level] + 1;
                                    
$exp_all_new $level_new * ($level_new) * 200;
                                    
$zero "0";
                                    
$allo $playerinfo[allopoints] + 3;
                                    if (
$playerinfo[level] > "2"){
                                    
$update_level mysql_query("update member set level='$level_new', exp='$zero', newexp='$exp_all_new', life=newlife, allopoints = '$allo' where email='$playerinfo[email]'") or die(mysql_error());
                                    echo 
"You gained a level! You were awarded 3 allocation points.<br>";
                                    } else {
                                    
$update_level mysql_query("update member set level='$level_new', exp='$zero', newexp=150, life=newlife, allopoints = '$allo' where email='$playerinfo[email]'") or die(mysql_error());
                                    echo 
"You gained a level! You were awarded 3 allocation point(s).<br>";
                                    }
                                    
    
$res mysql_query("SELECT * FROM member WHERE email='$email'") or die(mysql_error());
    
$playerinfo mysql_fetch_array($res);
    
mysql_free_result($res);
                                    }
                                    if(
$playerinfo[gang]>0){
                                    
$clan mysql_query("select * from gangs where id = '$playerinfo[gang]'") or die(mysql_error());
                                    
$select_clan mysql_fetch_array($clan);
                                    if (
$select_clan[exp_now] >= $select_clan[exp_all])
                                    {
                                    
$newexpall = ($select_clan[level] + 1) * 40000;
                                    
$update_agency_level mysql_query("update gangs set level=level+1, exp_now=0, exp_all='$newexpall' where id='$playerinfo[gang]'") or die(mysql_error());
                                    echo 
"Thanks To You.....Your gang gained a level!<br>";
                                    }
                                    }
                                    echo 
"<br><u>Stats</u>:<br>";
                                    echo 
"<b>Trains</b>: $playerinfo[trains] / $playerinfo[newtrains]<br>";
                                    echo 
"<b>Life</b>: $playerinfo[life] / $playerinfo[newlife]<br>";
                                    echo 
"<b>Experience</b>: $playerinfo[exp] / $playerinfo[newexp]<br><br>";
                                    echo 
"<u>Jump To</u>:<br>";
                                    echo 
"<a href=enter.php>$playerinfo[username]'s House</a> - <a href=bank.php>Bank</a> - <a href=hospital.php>Hospital</a> - <a href=testfig.php?step=fightsim&lvl=$lvl>Train against $row[username] Again</a><br><br>";
                                    echo 
"<center>[<a href=testfig.php>Back</a>]</center>";
                                }
        }
        }else{
                            echo 
"You can't train anymore!<br><br>";
                            echo 
"<center>[<a href=testfig.php>Back</a>]</center>";
                        }
            if(
$step == "battle"){
                    if(
$playerinfo[fight] >= 1){        
        
$select_player mysql_query("select * from member where id='$who'") or die(mysql_error());
        if(
mysql_num_rows($select_player)<=0){
            echo
"Player could not be found.";
            include(
"$playerinfo[scheme_footer]");
            exit();
        }
        
$row mysql_fetch_array($select_player);
        if (
$row[life] <= 0){ echo "$row[username] is already knocked out, so you just kick him several times for a laugh.";
        }else {
        if (
$playerinfo[life] <= 0){ echo "You already feel woOoSy... You can't fight him.. you dont feel well enough.. Maybe you should visit the <a href=\"hospital.php\">doctor</a>";
        }else {        
        echo
"1: ";
            if(
$playerinfo[agility]>$row[agility]){
                
attack('playerinfo');
            }elseif(
$row[agility]>$playerinfo[agility]){
                
attack('row');
            }else{
                if(
rand(1,2)==1){
                    
attack('playerinfo');
                }else{
                    
attack('row');
                }
//draw?
            
}//who first?
        
        
$line 1;
        while(
$playerinfo[life]>&& $row[life]>&& $line<501){
            
$line++;
            
$speedmod rand(($playerinfo[agility]/3),$playerinfo[agility]);
            
$speedmod = ($speedmod/$row[agility]);
            if(
$speedmod>.6){
                echo
"$line: ";
                
attack('playerinfo');
            }else{
                echo
"$line: ";
                
attack('row');
            }
        }
        if(
$line>=500){
            
$date_now date("m\/d H:i T");
            
$you $playerinfo[tties] + 1;
            
$them $sharedinfo[tties] + 1;
            
$stamina_new1 $playerinfo[fight] - 1.0000;
            
//get your alignment
            
$lalign = ($sharedinfo[alignment]/-4000);
            
$lalign ceil($lalign);
            
$halign = ($sharedinfo[alignment]/-2000);
            
$halign ceil($halign);
            if(
$sharedinfo[align]>0){
                
$align rand($halign,$lalign);
            }else{
                
$align rand($lalign,$halign);
            }
            
//get their alignment
            
$lalign = ($playerinfo[alignment]/-4000);
            
$lalign ceil($lalign);
            
$halign = ($playerinfo[alignment]/-2000);
            
$halign ceil($halign);
            if(
$playerinfo[align]>0){
                
$talign rand($halign,$lalign);
            }else{
                
$talign rand($lalign,$halign);
            }
            
$talign2 number_format(talign,0);
            
mysql_query("UPDATE member SET life='" intval($yourhealth) . "', fight='$stamina_new1', tties='$you', ties=ties + 1 WHERE email='$playerinfo[email]'") or die("ERROR:" mysql_error(). "");
            
mysql_query("update member set life='" intval($enemyhealth) . "', ties = ties + 1, tties ='$them' where email='$sharedinfo[email]'") or die(mysql_error());
            
mysql_query("INSERT INTO localnews (id, date, who, msg) VALUES ('', '$date_now', '$sharedinfo[id]', '<a href=player.php?id=$playerinfo[id]>$playerinfo[username]</a> ($playerinfo[id])  has stalemated you. You got $talign2 alinment out of it.')");
            
mysql_query("UPDATE member SET alignment=alignment + '$align' WHERE id='$playerinfo[id]'");
            
mysql_query("UPDATE member SET alignment=alignment + '$talign' WHERE id='$sharedinfo[id]'");
            
$align2 number_format($align,0);
            echo
"Stalemate! You both have been fighting for long enough. Its about time to break it up and call it evens. You were awarded <b>$align2</b> Alignment.";
        }elseif (
$yourhealth 0) {
            
$date_now date("m\/d H:i T");
            
$win_new1 $playerinfo[wins] + 1;
            
$loss_new1 $sharedinfo[loses] + 1;
            
$twins $playerinfo[twin] + 1;
            
$tloses $sharedinfo[tlose]+1;
            if ((
$sharedinfo[level]+6) < $playerinfo[level]) {
            
$exp_disp = ($sharedinfo[level]*44+2);
            
$exp_new1 $playerinfo['exp'] + ($sharedinfo[level]*44+2);
            }else if (
$sharedinfo[level] > ($playerinfo[level]+6)) {
            
$exp_disp = ($sharedinfo[level]*53+2);
            
$exp_new1 $playerinfo['exp'] + ($sharedinfo[level]*53+2);
            }else{
            
$exp_disp = ($sharedinfo[level]*48+2);
            
$exp_new1 $playerinfo['exp'] + ($sharedinfo[level]*48+2);
            }
 
            
$stamina_new1 $playerinfo[fight] - 1.0000;
            if(
$playerinfo[newfight]<50.93){
            if((
$playerinfo[level]+6)<$sharedinfo[level]){
            
$staminatotal1 $playerinfo[newfight] + 0.07;
            }else{
            
$staminatotal1 $playerinfo[newfight] + 0.03;
            }
            }else{
                
$staminatotal1 50.99;
            }
            if(
$sharedinfo[wallet] > 100){
                
$take_amount $sharedinfo[wallet] * .03;
                
$take_final ceil($take_amount);
            }else{
                
$take_final 0;
            }
            
$align = ($sharedinfo[alignment]/-1000);
            
$align ceil($align);
            
$new_align $playerinfo[alignment] + $align;
            
$new_align2 number_format($new_align2);
            
mysql_query("UPDATE member SET alignment='$new_align' WHERE id='$playerinfo[id]'");
            if (
$playerinfo[gang] == 0){            
            
$player_nuts $playerinfo[wallet] + $take_final;
            
$shared_nuts $sharedinfo[wallet] - $take_final;
            
$player_change $playerinfo[tdchange] + $take_final;
            
$loser_change $sharedinfo[tdchange] - $take_final;
            
            
mysql_query("UPDATE member SET exp='$exp_new1', life='" intval($yourhealth) . "', wins='$win_new1', newfight='$staminatotal1', twin='$twins', fight='$stamina_new1', lastkilled='$sharedinfo[id]', wallet='$player_nuts', tdchange='$player_change' WHERE email='$playerinfo[email]'") or die("ERROR:" mysql_error(). "");
            
$update_loss1 mysql_query("update member set life='0', loses='$loss_new1', killedlast='$playerinfo[id]', wallet='$shared_nuts', tlose='$tloses', tdchange='$loser_change' where email='$sharedinfo[email]'") or die(mysql_error());
            
$win_msg mysql_query("INSERT INTO localnews (id, date, who, msg) VALUES ('', '$date_now', '$sharedinfo[id]', '<a href=player.php?id=$playerinfo[id]>$playerinfo[username]</a> ($playerinfo[id])  has defeated you and took $take_final dollars.')");
            echo 
"You defeated $sharedinfo[username] ($sharedinfo[id]). Awarded <b>";
            if((
$playerinfo[level]+6)<$sharedinfo[level]){
            echo
".07";
            }else{
            echo
".03";
            }
            echo
"</b> Fight, <b>$take_final</b> Dollars, $new_align2 Alignment, and <B>" $exp_disp "</B> Experience<br>";
            } else {
            
$clan mysql_query("select * from gangs where id = '$playerinfo[gang]'") or die(mysql_error());
            
$select_clan mysql_fetch_array($clan);
            
$clan_percentage_convert $select_clan[exp_tax] / 100;
            
$clan_taxexp ceil($exp_disp $clan_percentage_convert);
            
$final_exp ceil($exp_disp $clan_taxexp);
            
$clan_percentage_convert1 $select_clan[nut_tax] / 100;
            
$clan_taxcash ceil($take_final $clan_percentage_convert1);
            
$final_cash ceil($take_final $clan_taxcash);
            
$player_nuts $playerinfo[wallet] + $take_final;
            
$shared_nuts $sharedinfo[wallet] - $take_final;
            
$player_change $playerinfo[tdchange] + $take_final;
            
$loser_change $sharedinfo[tdchange] - $take_final;
            
mysql_query("update member set exp=exp + '$final_exp', life='" intval($yourhealth) . "', wins='$win_new1', newfight='$staminatotal1', fight='$stamina_new1', lastkilled='$sharedinfo[id]', wallet=wallet+'$final_cash', twin='$twins', tdchange='$player_change' where email='$email'") or die(mysql_error());
            
mysql_query("update member set life='0', loses='$loss_new1', killedlast='$playerinfo[id]', wallet='$shared_nuts', tlose='$tloses', tdchange='$loser_change' where email='$sharedinfo[email]'") or die(mysql_error());
            
mysql_query("INSERT INTO localnews (id, date, who, msg) VALUES ('', '$date_now', '$sharedinfo[id]', '<a href=player.php?id=$playerinfo[id]>$playerinfo[username]</a> ($playerinfo[id])  has defeated you and took $take_final dollars.')");
            
mysql_query("update gangs set exp_now = exp_now + '$clan_taxexp', holdings = holdings + '$clan_taxcash' where id = '$playerinfo[gang]'") or die(mysql_error()); 
            echo 
"You defeated $sharedinfo[username] ($sharedinfo[id]). Awarded <b>.03</b> Fight, <b>$take_final</b> Dollars and <B>" $exp_disp "</B> Experience<br>";
            echo 
"Due To The Taxation. You Now Were Awared <b>$final_cash</b> Dollars, $new_align2 Alignment, and <B>" $final_exp "</B> Experience<br>";
            }
            
        
    
    
$res mysql_query("SELECT * FROM member WHERE email='$email'") or die(mysql_error());
    
$playerinfo mysql_fetch_array($res);
    
mysql_free_result($res);

        }else if (
$enemyhealth 0) {
            
$date_now date("m\/d H:i T");
            
$win_new2 $sharedinfo[wins] + 1;
            
$loss_new2 $playerinfo[loses] + 1;
            
$twinse $sharedinfo[twin]+1;
            
$tlosese $playerinfo[tlose]+1;
            if (
$sharedinfo[level] > ($playerinfo[level]+6)) {
            
$exp_disp = ($playerinfo[level]*44+2);
            
$exp_new1 $sharedinfo['exp'] + ($playerinfo[level]*44+2);
            }else if ((
$sharedinfo[level]+6) < $playerinfo[level]) {
            
$exp_disp = ($playerinfo[level]*53+2);
            
$exp_new1 $sharedinfo['exp'] + ($playerinfo[level]*53+2);
            }else{
            
$exp_disp = ($playerinfo[level]*48+2);
            
$exp_new1 $sharedinfo['exp'] + ($playerinfo[level]*48+2);
            }
 
            if(
$playerinfo[wallet] > 100){
                
$take_amount $playerinfo[wallet] * .03;
                
$take_final ceil($take_amount);
            }else{
                
$take_final 0;
            }
            
$stamina_new2 $playerinfo[fight] - 1.0000;
            if((
$playerinfo[newfight]-.025)<=5){
            
$staminatotal2 5;
            }else{
            
$staminatotal2 $playerinfo[newfight] - 0.025;
            }
            
$winnuts $sharedinfo[wallet] + $take_final;
            
$losenuts $playerinfo[wallet] - $take_final;
            
$winner_change $sharedinfo[tdchange] + $take_final;
            
$loser_change $playerinfo[tdchange] - $take_final;
            
$lalign = ($sharedinfo[alignment]/-4000);
            
$lalign ceil($lalign);
            
$halign = ($sharedinfo[alignment]/-2000);
            
$halign ceil($halign);
            if(
$sharedinfo[align]>0){
                
$align rand($halign,$lalign);
            }else{
                
$align rand($lalign,$halign);
            }
            
$new_align $playerinfo[alignment] + $align;
            
$new_align2 number_format($new_align);
            
mysql_query("UPDATE member SET alignment='$new_align' WHERE id='$playerinfo[id]'");
            
            
mysql_query("update member set life='" intval($enemyhealth) . "', wins='$win_new2', lastkilled='$playerinfo[id]', twin='$twinse', tdchange='$winner_change', wallet='winnuts', exp='$exp_new1' where email='$sharedinfo[email]'") or die(mysql_error());
            
mysql_query("update member set life='0', loses='$loss_new2', newfight='$staminatotal2', fight='$stamina_new2', killedlast='$sharedinfo[id]', tlose='$tlosese', tdchange='$loser_change', wallet='$losenuts' where email='$email'") or die(mysql_error());

            
mysql_query("INSERT INTO localnews (id, date, who, msg) VALUES ('', '$date_now', '$sharedinfo[id]', 'You have defeated <a href=player.php?id=$playerinfo[id]>$playerinfo[username]</a> ($playerinfo[id]) and stole $$take_final and aquired $exp_disp experience.')");


            echo 
"You lost to $sharedinfo[username] ($sharedinfo[id]). You aquired some alignment in this battle($new_align2 Alignment). You lose confidence in your fighting, <b>-.025";
            echo
"</b> Fight.<br>";
    
$res mysql_query("SELECT * FROM member WHERE email='$email'") or die(mysql_error());
    
$playerinfo mysql_fetch_array($res);
    
mysql_free_result($res);
        }
                                    if((
$playerinfo['exp'] >= $playerinfo[newexp]) && ($playerinfo[level]<500)){
                                    
$level_new $playerinfo[level] + 1;
                                    
$exp_all_new $level_new * ($level_new) * 200;
                                    
$zero "0";
                                    
$allo $playerinfo[allopoints] + 3;
                                    if (
$playerinfo[level] > "2"){
                                    
$update_level mysql_query("update member set level='$level_new', exp='$zero', newexp='$exp_all_new', life=newlife, allopoints = '$allo' where email='$playerinfo[email]'") or die(mysql_error());
                                    echo 
"You gained a level! You were awarded 3 allocation points.<br>";
                                    } else {
                                    
$update_level mysql_query("update member set level='$level_new', exp='$zero', newexp=150, life=newlife, allopoints = '$allo' where email='$playerinfo[email]'") or die(mysql_error());
                                    echo 
"You gained a level! You were awarded 3 allocation point(s).<br>";
                                    }
                                    
    
$res mysql_query("SELECT * FROM member WHERE email='$email'") or die(mysql_error());
    
$playerinfo mysql_fetch_array($res);
    
mysql_free_result($res);
                                    }
                                    if((
$sharedinfo['exp'] >= $sharedinfo[newexp]) && ($sharedinfo[level]<500))
                                    {
                                    
$level_new $sharedinfo[level] + 1;
                                    
$exp_all_new $level_new * ($level_new) * 200;
                                    
$zero "0";
                                    
$allo $sharedinfo[allopoints] + 3;
                                    if (
$sharedinfo[level] > "2")
                                    {
                                    
$update_level mysql_query("update member set level='$level_new', exp='$zero', newexp='$exp_all_new', life=newlife, allopoints = '$allo' where email='$sharedinfo[email]'") or die(mysql_error());
                                    echo 
"$sharedinfo[username] gained a level!<br>";
                                    } else {
                                    
$update_level mysql_query("update member set level='$level_new', exp='$zero', newexp=150, life=newlife, allopoints = '$allo' where email='$sharedinfo[email]'") or die(mysql_error());
                                    echo 
"$sharedinfo[username] gained a level!<br>";
                                    }
                                    
    
$res mysql_query("SELECT * FROM member WHERE email='$sharedinfo[email]'") or die(mysql_error());
    
$sharedinfo mysql_fetch_array($res);
    
mysql_free_result($res);
                                    }
                                    if(
$playerinfo[gang]>0){
                                    
$clan mysql_query("select * from gangs where id = '$playerinfo[gang]'") or die(mysql_error());
                                    
$select_clan mysql_fetch_array($clan);
                                    if (
$select_clan[exp_now] >= $select_clan[exp_all])
                                    {
                                    
$newexpall = ($select_clan[level] + 1) * 40000;
                                    
$update_agency_level mysql_query("update gangs set level=level+1, exp_now=0, exp_all='$newexpall' where id='$playerinfo[gang]'") or die(mysql_error());
                                    echo 
"Thanks To You.....Your gang gained a level!<br>";
                                    }
                                    }
                                    echo 
"<br><u>Stats</u>:<br>";
                                    echo 
"<b>Fight</b>: $playerinfo[fight] / $playerinfo[newfight]<br>";
                                    echo 
"<b>Life</b>: $playerinfo[life] / $playerinfo[newlife]<br>";
                                    echo 
"<b>Experience</b>: $playerinfo[exp] / $playerinfo[newexp]<br><br>";
                                    echo 
"<u>Jump To</u>:<br>";
                                    echo 
"<a href=enter.php>$playerinfo[username]'s $playerinfo[livingtype]</a> - <a href=bank.php>Bank</a> - <a href=hospital.php>Hospital</a><br><br>";
                                    echo 
"<center>[<a href=testfig.php>Back</a>]</center>";
                
                            }
                            }
                        }else{
                            echo 
"You can't fight anymore!<br><br>";
                            echo 
"<center>[<a href=testfig.php>Back</a>]</center>";
                        }
            if(
$step=="getodds"){
                echo
"Who would you like to get odds of?<br>
    <form action=\"testfig.php?step=odds\" method=post>
    ID: <input name=who type=text>
    <input name=\"\" type=\"submit\" value=\"Get Battle Odds\">
    </form>"
;
    } 
Above is a portion of my code that I edited...
I get an error saying....:
Code:
Parse error: syntax error, unexpected $end in /home/lostonea/public_html/testfig.php on line 1061
Line 1061 is the ending line (last line of code), which is
PHP Code:

?> 

So someone please help! I dont see anything wrong!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 12-04-06, 10:10 PM
UnrealEd's Avatar
UnrealEd UnrealEd is offline
Community Liaison
 
Join Date: May 2005
Location: Antwerp, Belgium
Posts: 3,165
Thanks: 4
Thanked 25 Times in 25 Posts
wow dude: that's an awfull lot of code. but here's what i found:
1. you forgot to close the following if:
PHP Code:

 if($step == "fightsim"){ 

i assume this should be closed right before:
PHP Code:

if($step == "battle"){ 

2. you forgot to close the following if as well:
PHP Code:

if($step == "battle"){ 

A good way to check if all if's are closed, is to delete all closed if's. You start from the deepest if (the if in the if in the if, ....), and then you go all the way up.

I noticed that you're repeating tons of code. I recommend you to take a look into function. They will speed up your program, and it make the code a much better to handle.

Code:
unexpected $end in
means that you forgot to close an if, while, for, foreach, etc...

UnrealEd
__________________
"Good judgement comes from experience, and experience comes from bad judgement." - Fred Brooks

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 12-06-06, 07:45 AM
stormshadow's Avatar
stormshadow stormshadow is offline
Coding Addict
 
Join Date: Mar 2005
Posts: 355
Thanks: 0
Thanked 0 Times in 0 Posts
Ahhh!!!

Thank you! The reason why is cause when I do steps i usually work with if/elseif or the switch.... ahhh!!!! thank you!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 12-06-06, 10:57 AM
Shaffer Shaffer is offline
Wannabe Coder
 
Join Date: Sep 2006
Location: Israel
Posts: 149
Thanks: 0
Thanked 0 Times in 0 Posts
Do you need help turning that into a few functions? Your page will load faster, too.
__________________
Hello from Israel!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #5 (permalink)  
Old 12-06-06, 09:05 PM
stormshadow's Avatar
stormshadow stormshadow is offline
Coding Addict
 
Join Date: Mar 2005
Posts: 355
Thanks: 0
Thanked 0 Times in 0 Posts
actually yes...

if you can that would be great!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
grrr... i wanna do this with one query... stormshadow Database 5 11-20-06 08:17 PM
grrr... stormshadow PHP 2 08-25-06 10:50 PM
Grrr 12 px are messing me up zitwep CSS 2 02-18-06 08:28 PM


All times are GMT -5. The time now is 10:23 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.