Jump to content

[SOLVED] Fatal error: Unsupported operand types


MasterACE14

Recommended Posts

I'm getting a error I've never encountered before and have no idea whats causing it.

 

here's the error:

Fatal error: Unsupported operand types in /home/ace/public_html/realmbattles/test.php on line 251

 

and here's the relevant code:

<?php
for ($i = 1; $i <= 8; $i++) 
{
$sql = "SELECT `cbank` FROM `Clans` WHERE `id` = '".$i."'";
$result = mysql_query($sql) or die('you screwed up the taxes 13!'.mysql_error());
// $bank = mysql_result($result,0,"cbank");
$bank = mysql_fetch_array($result);
if ($bank > 1000000000) 
{
  $arcane = floor($bank/1000000000);// line 251
  $banktake = $arcane*1000000000;
	$sql = "UPDATE `Clans` SET `arcane` = `arcane` + '$arcane', `cbank` = `cbank` - '$banktake' WHERE `id` = '".$i."'";
	mysql_query($sql) or die('you screwed up the taxes 13!'.mysql_error());
}
}

 

any help is greatly appreciated.

 

Regards ACE

Archived

This topic is now archived and is closed to further replies.

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