Castle Siege Module Erros

Status
Not open for further replies.
Newbie Spellweaver
Joined
Mar 22, 2009
Messages
87
Reaction score
0
Hello, RageZoners i have problem with my CS module. On my last site the module was working, but on the new sites the module is giving errors ?

This are the erros, and below is the module:

Code:
Warning: mssql_query() [function.mssql-query]: message: Invalid object name 'MuCastle_DATA'. (severity 16) in C:\Program Files\xampp\htdocs\modules\castlesiege.php on line 21

Warning: mssql_query() [function.mssql-query]: Query failed in C:\Program Files\xampp\htdocs\modules\castlesiege.php on line 21

Warning: mssql_fetch_row(): supplied argument is not a valid MS SQL-result resource in C:\Program Files\xampp\htdocs\modules\castlesiege.php on line 22

Warning: mssql_query() [function.mssql-query]: message: Invalid object name 'mucastle_reg_siege'. (severity 16) in C:\Program Files\xampp\htdocs\modules\castlesiege.php on line 23

Warning: mssql_query() [function.mssql-query]: Query failed in C:\Program Files\xampp\htdocs\modules\castlesiege.php on line 23
Castle Siege Is Not Installed On This Server

This is my module:

Code:
<br><img src="images/tuxy/castle-siege.png"></img><br><br>
<center>
  <table width="473" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td><div align="center">
          
      </div></td>
    </tr>
  </table>
  <table width="473" align="center" border="0" cellpadding="0" cellspacing="4">
    <tbody>
      <tr>
        <td><div align="center"><img src="images/castle_siege.png" /></div></td>
        <td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="2">
            <tbody>
              <tr>
                <td width="100%"><?
require("config.php"); 
$cs_map_server_group = "0";
$castle_siege_schedule = "Every one week on saturday from 20:00 - 22:00 server time ";
$cs = mssql_query("Select SIEGE_START_DATE,SIEGE_END_DATE,SIEGE_ENDED,CASTLE_OCCUPY,OWNER_GUILD,MONEY,TAX_RATE_CHAOS,TAX_RATE_STORE,TAX_HUNT_ZONE,MAP_SVR_GROUP from MuCastle_DATA where MAP_SVR_GROUP='$cs_map_server_group'");
$cs = mssql_fetch_row($cs);
$cs_g = mssql_query("SELECT reg_siege_guild,reg_marks from mucastle_reg_siege order by reg_marks desc");

if($cs){
if($cs[2] == '1'){

echo("Castle Siege Status: Ended"); } else { echo("<center><img src='http://archonmu.com/images/castle.png'></img><br><br><br>Castle Siege Status: On"); }
echo("<br>Castle Siege Schedule: <span class='text'>$castle_siege_schedule</span>");

if($cs[3] != NULL){

$cs[4] = htmlspecialchars($cs[4]);
echo("<br>Castle Owner Guild: <a href='index.php?op=guild&guild=$cs[4]'><font color=orange>$cs[4]</font></a>");}
else{echo("<br>Castle Owner Guild: No Owner");}




echo("<br>Money: <span class='text'>$cs[5]</span>");
echo("<br>Tax Chaos: <span class='text'>$cs[6]</span>");
echo("<br>Tax Store: <span class='text'>$cs[7]</span>");
echo("<br>Tax Hunt Zone: <span class='text'>$cs[8]</span><br><br><br><img src='http://archonmu.com/images/castlereg.png'></img><br>");


echo '<br><br><center>
<table class="mem" width="100%" id="news-head" height=30 border="0" cellpadding="2" cellspacing="2">                
<thead><tr>
<td class="mem" align="center">#</td>
<td class="mem" align="center">                 Name                 </td>
<td class="mem" align="center">Marks</td>
</tr></thead>';

for($i=0;$i < mssql_num_rows($cs_g);++$i)
{
$cs_guilds = mssql_fetch_row($cs_g);
$rank = $i+1;

$cs_guilds[0] = str_replace(">",">",$cs_guilds[0]);
$cs_guilds[0] = str_replace("<","<",$cs_guilds[0]);


echo "<tbody><tr>


<td align=center class=mem>$rank</td>
<td width='16%' class='mem' ><div align='center'> $cs_guilds[0]</td>
<td valign=top align=center class=mem><font color=red>$cs_guilds[1]</td>
</tr></tbody>
";
}
echo("</table>");

}else {echo("Castle Siege Is Not Installed On This Server");}
?></td>
              </tr>
            </tbody>
        </table></td>
      </tr>
    </tbody>
  </table>
</center>
 
Newbie Spellweaver
Joined
Mar 22, 2009
Messages
87
Reaction score
0
I can't undarstand your question.. what SQL settings, on the site or ? Because if it's on the site if i didn't configured them, the site would not be on.. please be more spasific then "sql settings"
 
Upvote 0
Newbie Spellweaver
Joined
Dec 23, 2012
Messages
22
Reaction score
0
On line 21, try to replace it with:
Code:
$cs = mssql_query("Select SIEGE_START_DATE,SIEGE_END_DATE,SIEGE_ENDED,CASTLE_OCCUPY,OWNER_GUILD,MONEY,TAX_RATE_CHAOS,TAX_RATE_STORE,TAX_HUNT_ZONE,MAP_SVR_GROUP from MuOnline.dbo.MuCastle_DATA where MAP_SVR_GROUP='$cs_map_server_group'");
 
Upvote 0
Newbie Spellweaver
Joined
Mar 22, 2009
Messages
87
Reaction score
0
On line 21, try to replace it with:
Code:
$cs = mssql_query("Select SIEGE_START_DATE,SIEGE_END_DATE,SIEGE_ENDED,CASTLE_OCCUPY,OWNER_GUILD,MONEY,TAX_RATE_CHAOS,TAX_RATE_STORE,TAX_HUNT_ZONE,MAP_SVR_GROUP from MuOnline.dbo.MuCastle_DATA where MAP_SVR_GROUP='$cs_map_server_group'");

If fixed some things but not all, here is the error it gives now:
Code:
Warning: mssql_query() [function.mssql-query]: message: Invalid object name 'MuCastle_DATA'. (severity 16) in C:\Program Files\xampp\htdocs\modules\castlesiege.php on line 21

Warning: mssql_query() [function.mssql-query]: Query failed in C:\Program Files\xampp\htdocs\modules\castlesiege.php on line 21

Warning: mssql_query() [function.mssql-query]: message: Invalid object name 'mucastle_reg_siege'. (severity 16) in C:\Program Files\xampp\htdocs\modules\castlesiege.php on line 23

Warning: mssql_query() [function.mssql-query]: Query failed in C:\Program Files\xampp\htdocs\modules\castlesiege.php on line 23



Castle Siege Status: On
Castle Siege Schedule: Every one week on saturday from 20:00 - 22:00 server time
Castle Owner Guild: Fearless
Money: 7944882
Tax Chaos: 1
Tax Store: 1
Tax Hunt Zone: 30000






Warning: mssql_num_rows(): supplied argument is not a valid MS SQL-result resource in C:\Program Files\xampp\htdocs\modules\castlesiege.php on line 54
# 	                 Name                  	Marks
 
Upvote 0
Junior Spellweaver
Joined
Oct 10, 2008
Messages
149
Reaction score
20
You do not have the right tables in your database or they have other names.
Check your database and (rename) the false entries in your castlesiege.php
 
Upvote 0
Status
Not open for further replies.
Back
Top