Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[server files] [jPT] Clan System 98%

Status
Not open for further replies.
Newbie Spellweaver
Joined
Jul 24, 2006
Messages
14
Reaction score
0
I found 2 problems in clanInsert.aspx

1 - The first INSERT haven't IDX value. The IDX column must have a value (NOT NULL field).
2 - The second INSERT haven't MIDX value. The MIDX column must have a value too.

I'm fixing it in my PHP version. My suggestions are:

1 - Get the last IDX value and add after the last value. A kind of "manual increment".
2 - Put 1 on this field by default. When you create a clan, it have 1 member, right (MIDX = Member InDeX)? Try to put 1 on this field.

It seems easy in theory xDDD

PS: I want the credits by this hint :p
Thats why he tells you to turn on autoindex in the readme..
 
Newbie Spellweaver
Joined
Aug 2, 2006
Messages
11
Reaction score
0
LOL! First problem solved...

But see the second problem... It's missing value, right?
 
Newbie Spellweaver
Joined
Aug 17, 2006
Messages
7
Reaction score
0
I finally made it yesterday, after all possible errors (i think).
For those who are having problems, it's very hard to know the error by the game error code.

To find the real error its necessary to make some changes at the code.
If anyone wants my help, please do the following steps and post here what you got, I'll try to help everyone but please be patient.

1) create a backup for your file /ClanSystem/web.config and then chance the web.config to:
<configuration xmlns=" ">
<system.web>
<customErrors mode="Off" />
<compilation debug="true" />
</system.web>
</configuration>

2) open /ClanSystem/clanInsert.aspx save as mytest.aspx and then edit the line
<%@ Page Language="VB"%>
to
<%@ Page Language="VB" debug="True"%>

3) also in mytest.aspx file change the first
Response.Write ("Code=100") to Response.Write ("Code=100a")
the second
Response.Write ("Code=100") to Response.Write ("Code=100b")
the third
Response.Write ("Code=100") to Response.Write ("Code=100c")
keep doing this till the end of the file, this will help to find where the error is.

4) create a test account with one char on it.

5) run the mytest file by accessing your localhost or the host passing the right parameters as the example bellow (change your id and char name).


Note that we will note solve anything yet, we need to find the errors first.
Post the error you got here so I'll try to help.
 
Newbie Spellweaver
Joined
Jan 26, 2004
Messages
54
Reaction score
10
another clan file

but this file is same file< add .doc >

from china forum

< >

---------------------------------------------------------------
error(11) check you DB setting

ClanDb -> S1ClanMain - modify - idx
ClanDb -> S1ClanSub - modify - midx
- show pic


sorry my bad english
 

Attachments

You must be registered for see attachments list
Last edited:
Newbie Spellweaver
Joined
Jul 24, 2006
Messages
14
Reaction score
0
LOL! First problem solved...

But see the second problem... It's missing value, right?
Yes, which is why you're supposed to turn on autoindexing for that field aswell.

That chinese thing is just showing how to enable autoindex for MSSQL.
Right click on the column -> Modify
Go to Column Properties at the bottom, expand Identity Specification (click the little cross next to it), then change (Is Identity) to Yes.
 
Newbie Spellweaver
Joined
Aug 2, 2006
Messages
11
Reaction score
0
Well... If you want, you can change MIDX field to accept null values, and modify IDX field to do autoindex. My experience is with MySQL and Interbase/Firebird, I don't work with MS-SQL yet (it seems interessant, I have interest in PostgreSQL too). For those that want to fix these bugs without change the script, try to modify the ClanMain and ClanSub tables ^^
 
Experienced Elementalist
Joined
Nov 8, 2004
Messages
279
Reaction score
36
Well... If you want, you can change MIDX field to accept null values, and modify IDX field to do autoindex. My experience is with MySQL and Interbase/Firebird, I don't work with MS-SQL yet (it seems interessant, I have interest in PostgreSQL too). For those that want to fix these bugs without change the script, try to modify the ClanMain and ClanSub tables ^^

i write it as ....

-Tables [%serverid]ClanMain (aka S1ClanMain, S2ClanMain, what u use)
have an autoindex=yes for field IDX.
-Tables [%serverid]ClanSub (aka S1ClanSub, S2ClanSub, what u use)
have an autoindex=yes for field MIDX.

so understand autoindex means autoincrement or identity, so the idea on this is let the database by itself adds the values and set an incrementing value to not have multiple values :p, so in this case must not be nulls.

Btw this trouble for identity happens on sod tables and logs tables, so the general table schema need some small tuning.
 
Last edited:
Retired (Goddamn idiots)
Joined
Dec 3, 2003
Messages
391
Reaction score
483
I finally made it yesterday, after all possible errors (i think).
For those who are having problems, it's very hard to know the error by the game error code.

To find the real error its necessary to make some changes at the code.
If anyone wants my help, please do the following steps and post here what you got, I'll try to help everyone but please be patient.

1) create a backup for your file /ClanSystem/web.config and then chance the web.config to:
<configuration xmlns=" ">
<system.web>
<customErrors mode="Off" />
<compilation debug="true" />
</system.web>
</configuration>

2) open /ClanSystem/clanInsert.aspx save as mytest.aspx and then edit the line
<%@ Page Language="VB"%>
to
<%@ Page Language="VB" debug="True"%>

3) also in mytest.aspx file change the first
Response.Write ("Code=100") to Response.Write ("Code=100a")
the second
Response.Write ("Code=100") to Response.Write ("Code=100b")
the third
Response.Write ("Code=100") to Response.Write ("Code=100c")
keep doing this till the end of the file, this will help to find where the error is.

4) create a test account with one char on it.

5) run the mytest file by accessing your localhost or the host passing the right parameters as the example bellow (change your id and char name).


Note that we will note solve anything yet, we need to find the errors first.
Post the error you got here so I'll try to help.

In Game Error: 58
The way you did: Error 100b

I would love further assistance :)
 
Experienced Elementalist
Joined
Nov 8, 2004
Messages
279
Reaction score
36
In Game Error: 58
The way you did: Error 100b

I would love further assistance :)

hmm nice way to explain that :p

so... it correspond one of the traps on GetParameter?, if so the trouble is on line
regex.ismatch (lTmp,"[a-zA-Z0-9_.-\[\]]{1,}")
the main trouble seems that one of ur parameters not meets the regular expression checksum "[a-zA-Z0-9_.-\[\]]{1,}", aka is needed to rewrite that or comment the function in the mode i say :p, this is the anit-injection checksum that seems not working fine for all ppl. :(

Code:
'        select case pType
'            case "Numeric"
'                if not regex.ismatch (lTmp,"[0-9]{1,}") then
'                    Response.Write ("Code=100")
'    	            Response.End
'                end if
'            case "String"
'                if regex.ismatch (lTmp,"[a-zA-Z0-9_.-\[\]]{1,}") then
'                    Response.Write ("Code=100")
'    	            Response.End
'                end if
'        end select
 
Junior Spellweaver
Joined
Apr 5, 2006
Messages
113
Reaction score
75
hmm nice way to explain that :p

so... it correspond one of the traps on GetParameter?, if so the trouble is on line
regex.ismatch (lTmp,"[a-zA-Z0-9_.-\[\]]{1,}")
the main trouble seems that one of ur parameters not meets the regular expression checksum "[a-zA-Z0-9_.-\[\]]{1,}", aka is needed to rewrite that or comment the function in the mode i say :p, this is the anit-injection checksum that seems not working fine for all ppl. :(

Code:
'        select case pType
'            case "Numeric"
'                if not regex.ismatch (lTmp,"[0-9]{1,}") then
'                    Response.Write ("Code=100")
'    	            Response.End
'                end if
'            case "String"
'                if regex.ismatch (lTmp,"[a-zA-Z0-9_.-\[\]]{1,}") then
'                    Response.Write ("Code=100")
'    	            Response.End
'                end if
'        end select


That figures.
And do you possibly know how to fix that one? :p
 
Newbie Spellweaver
Joined
Aug 17, 2006
Messages
7
Reaction score
0
I fixed this problem by changing the line
if regex.ismatch (lTmp,"[a-zA-Z0-9_.-\[\]]{1,}") then
to
if regex.ismatch (lTmp,"\A[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z]{2,4}\z", RegexOptions.IgnoreCase) then
I guess thats better than only comment the code.
 
Junior Spellweaver
Joined
Apr 5, 2006
Messages
113
Reaction score
75
Okay so...

Now everything works and i get a SQL error we dont like!

We use MicroSoft SQL Server 2000

Read the following:

Code:
Server Error in '/Clan' Application.
--------------------------------------------------------------------------------

An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

Source Error: 


Line 135:    
Line 136:        myConnection = New SqlConnection(connectionString)
Line 137:        myConnection.Open()
Line 138:    
Line 139:    
 

Source File: C:\Inetpub\wwwroot\Clan\mytest.aspx    Line: 137 

Stack Trace: 


[SqlException (0x80131904): An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)]
   System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +452
   System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +85
   System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +89
   System.Data.SqlClient.SqlConnection.Open() +160
   ASP.mytest_aspx.Page_Load(Object Sender, EventArgs E) in C:\Inetpub\wwwroot\Clan\mytest.aspx:137
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +13
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +45
   System.Web.UI.Control.OnLoad(EventArgs e) +80
   System.Web.UI.Control.LoadRecursive() +49
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3745

 


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42

Well... See? it says 2005!

Is this some kind of problem, because all settings are right! I dunno :/
 
Newbie Spellweaver
Joined
Aug 17, 2006
Messages
7
Reaction score
0
XxDeMoNxX,
This is the problem that took most of my time yesterday.
You need to make some changes at your SQL server to allow TCP/IP connections.
I'll try to make a tutorial and post here today.
 
Junior Spellweaver
Joined
Apr 5, 2006
Messages
113
Reaction score
75
XxDeMoNxX,
This is the problem that took most of my time yesterday.
You need to make some changes at your SQL server to allow TCP/IP connections.
I'll try to make a tutorial and post here today.

Ok that would be helpfull I wonder how u fixed this one :)
Also do you use IIS or Apache?
 
Last edited:
Junior Spellweaver
Joined
Apr 5, 2006
Messages
113
Reaction score
75
Ok I cahnged back to IIS

Im able to type clan name in game now, but then i get:
ERROR 11.
On the web-test i still get the SQL error.

Oh well :/
 
Experienced Elementalist
Joined
Nov 8, 2004
Messages
279
Reaction score
36
XxDeMoNxX,
This is the problem that took most of my time yesterday.
You need to make some changes at your SQL server to allow TCP/IP connections.
I'll try to make a tutorial and post here today.

with sqlserver2k5 you can work with pipes, so in the connection string use the PCNAME, or try the PCNAME\SQLEXPRESS, it should be exactly as same name it appears on your server manager ;)

and thx for the new "\A[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z]{2,4}\z" regular expression checker :), im guess if would be right the one in common.asp or need to be fixed to this too.
 
Last edited:
Status
Not open for further replies.
Back
Top