Jump to content
MakeWebGames

Recommended Posts

Posted

hello i have added a streets mod to my game and when i go on it and type in how many steps and click scavenge it comes up

The page cannot be found

 

also when i click on cyberbank.php it comes up

Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE or '$' in /home/nwcrimes/public_html/cyberbank.php on line 81

can anybody help me as soon as possible thanks

Posted

Re: Streets.php and cyberbank.php help

Ye si am able to help :)

First error:

search for the folowing:

<form method='post' action='A scripts name will be here. Rename it to the current.'>

 

Second Error:

You have an " in an invalid place.

You can post the script ere so i can debug it for you.

  • 1 month later...
Posted

Re: Streets.php and cyberbank.php help

yo i have the same second error can you debug it for me deathstar thnx

<?php
include "globals.php";
print "<h3>Cyber Bank</h3>";
if($ir['cybermoney']>-1)
{
switch($_GET['action'])
{
case "deposit":
deposit();
break;

case "withdraw":
withdraw();
break;

default:
index();
break;
}

}
else
{
if(isset($_GET['buy']))
{
if($ir['money']>9999999)
{
print "Congratulations, you bought a bank account for \$10,000,000!

[url='cyberbank.php']Start using my account[/url]";
$db->query("UPDATE users SET money=money-10000000,cybermoney=0 WHERE userid=$userid");
}
else
{
print "You do not have enough money to open an account.
[url='explore.php']Back to town...[/url]";
}
}
else
{
print "Open a bank account today, just \$10,000,000!

[url='cyberbank.php?buy']> Yes, sign me up![/url]";
}
}
function index()
{
global $db,$ir,$c,$userid,$h;
print "\n[b]You currently have \${$ir['cybermoney']} in the bank.[/b]

At the end of each day, your bank balance will go up by 7%.

<table width='75%' border='2'> <tr> <td width='50%'>[b]Deposit Money[/b]

It will cost you 15% of the money you deposit, rounded up. The maximum fee is \$1,500,000.<form action='cyberbank.php?action=deposit' method='post'>
Amount: <input type='text' name='deposit' value='{$ir['money']}' />

<input type='submit' value='Deposit' /></form></td> <td>
[b]Withdraw Money[/b]

It will cost you 7.5% of the money you withdraw, rounded up. The maximum fee is \$750,000.<form action='cyberbank.php?action=withdraw' method='post'>
Amount: <input type='text' name='withdraw' value='{$ir['cybermoney']}' />

<input type='submit' value='Withdraw' /></form></td> </tr> </table>";
}
function deposit()
{
global $db,$ir,$c,$userid,$h;
$_POST['deposit']=abs((int) $_POST['deposit']);
if($_POST['deposit'] > $ir['money'])
{
print "You do not have enough money to deposit this amount.";
}
else
{
$fee=ceil($_POST['deposit']*15/100);
if($fee > 1500000) { $fee=1500000; }
$gain=$_POST['deposit']-$fee;
$ir['cybermoney']+=$gain;
$db->query("UPDATE users SET cybermoney=cybermoney+$gain, money=money-{$_POST['deposit']} where userid=$userid");
print "You hand over \${$_POST['deposit']} to be deposited, 

after the fee is taken (\$$fee), \$$gain is added to your account. 

[b]You now have \${$ir['cybermoney']} in the Cyber Bank.[/b]

[url='cyberbank.php']> Back[/url]";
}
}
function withdraw()
{
global db,$ir,$c,$userid,$h;
$_POST['withdraw']=abs((int) $_POST['withdraw']);
if($_POST['withdraw'] > $ir['cybermoney'])
{
print "You do not have enough banked money to withdraw this amount.";
}
else
{
$fee=ceil($_POST['withdraw']*75/1000);
if($fee > 750000) { $fee=750000; }
$gain=$_POST['withdraw']-$fee;
$ir['cybermoney']-=$gain;
$db->query("UPDATE users SET cybermoney=cybermoney-$gain, money=money+$gain where userid=$userid");
print "You ask to withdraw $gain, 

the teller hands it over after she takes the bank fees. 

[b]You now have \${$ir['cybermoney']} in the Cyber Bank.[/b]

[url='cyberbank.php']> Back[/url]";
}
}
$h->endpage();
?>
Posted

Re: Streets.php and cyberbank.php help

 

<?php
include "globals.php";
print "<h3>Cyber Bank</h3>";
if($ir['cybermoney']>-1)
{
switch($_GET['action'])
{
case "deposit":
deposit();
break;

case "withdraw":
withdraw();
break;

default:
index();
break;
}

}
else
{
if(isset($_GET['buy']))
{
if($ir['money']>9999999)
{
print "Congratulations, you bought a bank account for \$10,000,000!

[url='cyberbank.php']Start using my account[/url]";
$db->query("UPDATE users SET money=money-10000000,cybermoney=0 WHERE userid=$userid");
}
else
{
print "You do not have enough money to open an account.
[url='explore.php']Back to town...[/url]";
}
}
else
{
print "Open a bank account today, just \$10,000,000!

[url='cyberbank.php?buy']> Yes, sign me up![/url]";
}
}
function index()
{
global $db,$ir,$c,$userid,$h;
print "\n[b]You currently have \${$ir['cybermoney']} in the bank.[/b]

At the end of each day, your bank balance will go up by 7%.

<table width='75%' border='2'> <tr> <td width='50%'>[b]Deposit Money[/b]

It will cost you 15% of the money you deposit, rounded up. The maximum fee is \$1,500,000.<form action='?action=deposit' method='post'>
Amount: <input type='text' name='deposit' value='{$ir['money']}' />

<input type='submit' value='Deposit' /></form></td> <td>
[b]Withdraw Money[/b]

It will cost you 7.5% of the money you withdraw, rounded up. The maximum fee is \$750,000.<form action='cyberbank.php?action=withdraw' method='post'>
Amount: <input type='text' name='withdraw' value='{$ir['cybermoney']}' />

<input type='submit' value='Withdraw' /></form></td> </tr> </table>";
}
function deposit()
{
global $db,$ir,$c,$userid,$h;
$_POST['deposit']=abs((int) $_POST['deposit']);
if($_POST['deposit'] > $ir['money'])
{
print "You do not have enough money to deposit this amount.";
}
else
{
$fee=ceil($_POST['deposit']*15/100);
if($fee > 1500000) { $fee=1500000; }
$gain=$_POST['deposit']-$fee;
$ir['cybermoney']+=$gain;
$db->query("UPDATE users SET cybermoney=cybermoney+$gain, money=money-{$_POST['deposit']} where userid=$userid");
print "You hand over \${$_POST['deposit']} to be deposited, 

after the fee is taken (\$$fee), \$$gain is added to your account. 

[b]You now have \${$ir['cybermoney']} in the Cyber Bank.[/b]

[url='cyberbank.php']> Back[/url]";
}
}
function withdraw()
{
global db,$ir,$c,$userid,$h;
$_POST['withdraw']=abs((int) $_POST['withdraw']);
if($_POST['withdraw'] > $ir['cybermoney'])
{
print "You do not have enough banked money to withdraw this amount.";
}
else
{
$fee=ceil($_POST['withdraw']*75/1000);
if($fee > 750000) { $fee=750000; }
$gain=$_POST['withdraw']-$fee;
$ir['cybermoney']-=$gain;
$db->query("UPDATE users SET cybermoney=cybermoney-$gain, money=money+$gain where userid=$userid");
print "You ask to withdraw $gain, 

the teller hands it over after she takes the bank fees. 

[b]You now have \${$ir['cybermoney']} in the Cyber Bank.[/b]

[url='cyberbank.php']> Back[/url]";
}
}
$h->endpage();
?>
  • 1 month later...
Posted

Re: Streets.php and cyberbank.php help

i still get this error

Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE or '$' in /home2/unitedcr/public_html/cyberbank.php on line 81

o well im working on it :D

Posted

Re: Streets.php and cyberbank.php help

now it works use this

 

<?php
include "globals.php";
print "<h3>Cyber Bank</h3>";
if($ir['cybermoney']>-1)
{
switch($_GET['action'])
{
case "deposit":
deposit();
break;

case "withdraw":
withdraw();
break;

default:
index();
break;
}

}
else
{
if(isset($_GET['buy']))
{
if($ir['money']>9999999)
{
print "Congratulations, you bought a bank account for \$10,000,000!

[url='cyberbank.php']Start using my account[/url]";
$db->query("UPDATE users SET money=money-10000000,cybermoney=0 WHERE userid=$userid");
}
else
{
print "You do not have enough money to open an account.
[url='explore.php']Back to town...[/url]";
}
}
else
{
print "Open a bank account today, just \$10,000,000!

[url='cyberbank.php?buy']> Yes, sign me up![/url]";
}
}
function index()
{
global $db,$ir,$c,$userid,$h;
print "\n[b]You currently have \${$ir['cybermoney']} in the bank.[/b]

At the end of each day, your bank balance will go up by 7%.

<table width='75%' border='2'> <tr> <td width='50%'>[b]Deposit Money[/b]

It will cost you 15% of the money you deposit, rounded up. The maximum fee is \$1,500,000.<form action='?action=deposit' method='post'>
Amount: <input type='text' name='deposit' value='{$ir['money']}' />

<input type='submit' value='Deposit' /></form></td> <td>
[b]Withdraw Money[/b]

It will cost you 7.5% of the money you withdraw, rounded up. The maximum fee is \$750,000.<form action='cyberbank.php?action=withdraw' method='post'>
Amount: <input type='text' name='withdraw' value='{$ir['cybermoney']}' />

<input type='submit' value='Withdraw' /></form></td> </tr> </table>";
}
}
function deposit()
{
global $db,$ir,$c,$userid,$h;
$_POST['deposit']=abs((int) $_POST['deposit']);
if($_POST['deposit'] > $ir['money'])
{
print "You do not have enough money to deposit this amount.";
}
else
{
$fee=ceil($_POST['deposit']*15/100);
if($fee > 1500000) { $fee=1500000; }
$gain=$_POST['deposit']-$fee;
$ir['cybermoney']+=$gain;
$db->query("UPDATE users SET cybermoney=cybermoney+$gain, money=money-{$_POST['deposit']} where userid=$userid");
print "You hand over \${$_POST['deposit']} to be deposited, 

after the fee is taken (\$$fee), \$$gain is added to your account. 

[b]You now have \${$ir['cybermoney']} in the Cyber Bank.[/b]

[url='cyberbank.php']> Back[/url]";
}
}
function withdraw()
{
global $db,$ir,$c,$userid,$h;
$_POST['withdraw']=abs((int) $_POST['withdraw']);
if($_POST['withdraw'] > $ir['cybermoney'])
{
print "You do not have enough banked money to withdraw this amount.";
}
else
{
$fee=ceil($_POST['withdraw']*75/1000);
if($fee > 750000) { $fee=750000; }
$gain=$_POST['withdraw']-$fee;
$ir['cybermoney']-=$gain;
$db->query("UPDATE users SET cybermoney=cybermoney-$gain, money=money+$gain where userid=$userid");
print "You ask to withdraw $gain, 

the teller hands it over after she takes the bank fees. 

[b]You now have \${$ir['cybermoney']} in the Cyber Bank.[/b]

[url='cyberbank.php']> Back[/url]";
}
}
$h->endpage();
?>

 

* Editted by LostOne: Please use code tags on php pages *

 

Like below (Without the stars):

[code*] content [*/code]

  • 2 weeks later...
Guest Anonymous
Posted

Re: Streets.php and cyberbank.php help

Or u could of just replaced the function .

 

function withdraw()

{

global $db,$ir,$c,$userid,$h;

$_POST['withdraw']=abs((int) $_POST['withdraw']);

if($_POST['withdraw'] > $ir['cybermoney'])

{

print "You do not have enough banked money to withdraw this amount.";

}

else

{

$fee=ceil($_POST['withdraw']*75/1000);

if($fee > 750000) { $fee=750000; }

$gain=$_POST['withdraw']-$fee;

$ir['cybermoney']-=$gain;

$db->query("UPDATE users SET cybermoney=cybermoney-$gain, money=money+$gain where userid=$userid");

print "You ask to withdraw $gain,

the teller hands it over after she takes the bank fees.

You now have \${$ir['cybermoney']} in the Cyber Bank.

> Back";

}

}

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.   Paste as plain text instead

  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...