Jump to content

error on my page


R1der

Recommended Posts

ok i tried my best to fix this my self and then found my self here asked for help lol

i get this error

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/lostcity/public_html/mailbomb.php on line 41

[code]<?PHP
$rand = rand(11,20);
   if($rand==11 || $rand==12 || $rand==13 || $rand==14 || $rand==15 || $rand==16 || $rand==17 || $rand==18 || $rand==19 || $rand==20){
   echo "You Go and buy a bomb and some anthrax You send it to $r['username'] through the maill thay open the package and the bomb explodes spraying anthrax in there face and landing them in hospital for 400 minutes and earning you 650 exp."; // this is line 41
   
   mysql_query("update users set exp=exp+650 , money=money-15000 where userid=$userid",$c);
   mysql_query("UPDATE users SET hospreason=\"Sprayed with anthrax from $ir['username'] WHERE userid={$in}", $c);
   event_add($in, "<a href='viewuser.php?u=$userid'>{$ir['username']}</a> Sent you a mailbomb in the mail spraying anthrax in your face you are in hospital!", $c);
}
?>[/code]

[code]echo "You Go and buy a bomb and some anthrax You send it to $r['username'] through the maill thay open the package and the bomb explodes spraying anthrax in there face and landing them in hospital for 400 minutes and earning you 650 exp."; // this is line 41[/code]

can anyone spot the problem?

thanks for your time
Link to comment
Share on other sites

This is more of the code

[code=php:0]
<?PHP
$rand = rand(1,10);
  if($rand==1 || $rand==2 || $rand==3 || $rand==4 || $rand==5 || $rand==6 || $rand==7 || $rand==8 || $rand==9 || $rand==10){
  echo "You cross the wires in the bomb as you are putting it together it explodes and sprays anthrax in your face and landing you in hospital for 400 minutes and taking 300 exp from you.";
 
  mysql_query("update users set exp=exp-300 , hospital=hospital+400 , hospreason=\"Sprayed with anthrax while doing a mailbomb\" where userid=$userid",$c);
}
$rand = rand(11,20);
  if($rand==11 || $rand==12 || $rand==13 || $rand==14 || $rand==15 || $rand==16 || $rand==17 || $rand==18 || $rand==19 || $rand==20){
  echo "You Go and buy a bomb and some anthrax You send it to $r['username'] through the maill thay open the package and the bomb explodes spraying anthrax in there face and landing them in hospital for 400 minutes and earning you 650 exp.";
 
  mysql_query("update users set exp=exp+650 , money=money-15000 where userid=$userid",$c);
  mysql_query("UPDATE users SET hospreason=\"Sprayed with anthrax from $ir['username'] WHERE userid={$in}", $c);
  event_add($in, "<a href='viewuser.php?u=$userid'>{$ir['username']}</a> Sent you a mailbomb in the mail spraying anthrax in your face you are in hospital!", $c);
}
?>[/code]
Link to comment
Share on other sites

Second look and your code makes no sense. You generate a random number between 1 - 10, then execute some code if your random number is between 1 - 10. Whats the point?

Also... do you like typing or something? See my previous reply.

As for your error. I dont see anything in your code that would generate that error.
Link to comment
Share on other sites

[quote]yes  1 - 10 is the fail message

11 - 20 is the succsed message
[/quote]

Both of these are going to run, one after the other.

[quote]i dont see no point in changing the "if" statemts till i fix this error[/quote]

Thats caused your error Im sure. You'd need to use something like...

[code=php:0]
if (($rand==1) || ($rand==2) || ($rand==3)) {
[/code]

I dont fancy typing out all the rest but you get the idea.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.