Hello,
On my server whenever I click on the SOD Scoreboard I get "Error C++ Visual Effects" message and get kicked out of the server. Can somebody help me fix this problem please? Or what is the reason I am getting this?
Thanks,
Air Bourne
Printable View
Hello,
On my server whenever I click on the SOD Scoreboard I get "Error C++ Visual Effects" message and get kicked out of the server. Can somebody help me fix this problem please? Or what is the reason I am getting this?
Thanks,
Air Bourne
That error is generated by the Exception handler built into the executable by Visual C++... It's a runtime error, and basically means that some routine has been passed invalid data, and can't process it without performing an "illegal instruction".
...I see, and how can I fix this invalid data to pass as valid?
Hmm. Well, under normal circumstances one would say that either your game.exe is written wrong in the first place, or has been corrupted by some Olly edit. But because this is PT, and their programming is pretty lax to begin with, it could simply be that it is not happy with the format of the page it receives from your server.
A runtime error like that should never happen in released software. Code should be extensively tested against invalid data so that it handles it "gracefully". That is, by politely informing the user that there was an error in the input, disregarding that input and continuing it's other operations normally.
As I frequently say here, I've never practised Clan and SoD operations on Priston Tale... but I would begin by checking the log on your Web Server (some version of IIS presumably) to see what exact URL was requested by the game client.
I would then examine what response the web server gives to such a URL request, in a web browser, and / or telnet terminal, and / or packet analyser.
The Web Browser should be sufficient, because from what I can see in the code, game.exe essentially has a custom version of GNU "wget" built in to it that requests the URL, and processes the response as thought it was a text file. Like any of the config files PT uses for hotuk, NPCs, monsters etc etc.
But it is possible that a browsers laxer will not recognise the plain text as actual plain text, and try to render formatting that isn't there... which is where telnet would come in. You can use telnet on port 80 to access a web server by issuing the GET, SEND, POST etc messages as your web browser would, and then you can see the full, plain text responses the server returns without any formatting that the browser would apply.
This should make even header information show up on screen that, even if you looked at the page source from you browser, would normally be stripped.
A packet monitor will show the header information and additionally, will show where packets start, end and the next packet starts... where telnet will only view the "conversation". It should be overkill, but may show up something like, the client expects all of a certain piece of information to be in one packet and it's actually split across two.
In all honesty, I don't think it should go that far, however. Because wget is such standard and stable code (very basic operation) there is no reason why the PT developers shouldn't use a stripped down version of it. But there are many other examples where they have done things the hard way. :wink:
It may become obvious from the page returned by your web server that the information is not all there, or not in the correct format. This you can fix in the ASP / PHP script. It may simply be that your web server is responding "404" or "500" for example. In which case, the permissions or name are wrong, or the script is looking for parameters in a different order than the game.exe is passing them or such.
If it's passing a page that looks like it's formatted correctly, then you need to use Olly on the game.exe to trace the WS32 calls in it when SoD is complete. Is there a packet that is too large for the buffer it set up, a string that's too long, a word where it expects a number etc etc.
-----
There speaks the voice of experience. Thanks Gregoory. :D:
-----
-----
Ahh, SQL Injections. Yes, I think most pages called by Game.exe do pass information via the URL. One would hope there is some level of data validation performed on the fields passed performed by the ASP script.
I don't really understand the vulnerabilities in ASP & SQL though, so I wouldn't know what was secure and what wasn't.
Gregoory and Bobsobol,
I will deffinetly look into this soon and try to fix it.
Thanks,
Air Bourne
~BUMP~
I tried to fix this but still didn't work, maybe you guys can take a look into my sod2info script and try to correct it?
Code:<!-- #include file ="SODsettings.asp" -->
<%
'Written By Sandurr COPYRIGHT Sandurr 2006
'Written By Sandurr COPYRIGHT Sandurr 2006
'Written By Sandurr COPYRIGHT Sandurr 2006
'Written By Sandurr COPYRIGHT Sandurr 2006
'Written By Sandurr COPYRIGHT Sandurr 2006
'Version 1.0 NOVEMBER 2006 (Clan 2.0 SoD 1.0)
' Assign Global Variables
Dim dbhost, dbuser, dbpass, dbname1, dbname2, userid, gserver, chname, index
FillSettings()
Dim strSplit, strSplit2
strSplit = Chr("&H" & "0D")
strSplit2 = Chr("&H" & "7C")
' Parameter Variables
' sod2info (userid, gserver, chname, index)
userid = Trim(Request("userid"))
gserver = Trim(Request("gserver"))
chname = Trim(Request("chname"))
index = Trim(Request("index"))
if userid = "" Or chname = ""Then
Response.Write("Code=100")
Response.End
End if
if index = "" Then
Response.Write("Code=104")
Response.End
End if
Dim QUERY, RS, objConn, strReturn, i
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "Provider=SQLOLEDB; Data Source=" & dbhost & "; Initial Catalog=" & dbname1 & "; User ID=" & dbuser & "; Password=" & dbpass
Set RS = Server.CreateObject("ADODB.Recordset")
Dim ClanIMG, ClanName, ClanPoint, ClanDate, ClanNote, ClanMoney, ClanLeader, ClanSubChief
Dim iNum, ClanSub, ClanSubLeader
Select Case index
Case "1" 'Main Karina Page
QUERY = "SELECT * FROM CL ORDER BY Cpoint DESC"
RS.Open QUERY, objConn, 3, 1
If RS.RecordCount > 0 Then
ClanPoint = RS("Cpoint").Value
ClanNote = RS("Note").Value
ClanName = RS("ClanName").Value
ClanIMG = RS("MIconCnt").Value
ClanLeader = RS("ClanZang").Value
ClanMoney = RS("ClanMoney").Value
RS.Close
QUERY = "SELECT * FROM UL WHERE chname='" & chname & "'"
RS.Open QUERY, objConn, 3, 1
If Not RS.RecordCount > 0 Then
iNum = 0
strReturn = "Code=" & iNum & strSplit2 & "CClanMoney=0" & strSplit2 & "CTax=0" & strSplit2 & "CName=" & ClanName & strSplit2 & "CNote=" & ClanNote & strSplit2 & "CZang=" & ClanLeader & strSplit2 & "CIMG=" & ClanIMG & strSplit2
Else
ClanSub = RS("ClanName").Value
ClanSubChief = RS("Permi").Value
If ClanName = ClanSub Then
If ClanLeader = chname Then
iNum = 1
strReturn = "Code=" & iNum & strSplit2 & "CClanMoney=" & ClanMoney & strSplit2 & "CTax=0" & strSplit2 & "CName=" & ClanName & strSplit2 & "CNote=" & ClanNote & strSplit2 & "CZang=" & ClanLeader & strSplit2 & "CIMG=" & ClanIMG & strSplit2 & "TotalEMoney=" & ClanMoney & strSplit2 & "TotalMoney=" & ClanMoney & strSplit2
ElseIf ClanSubChief = 2 Then
iNum = 2
strReturn = "Code=" & iNum & strSplit2 & "CClanMoney=0" & strSplit2 & "CTax=0" & strSplit2 & "CName=" & ClanName & strSplit2 & "CNote=" & ClanNote & strSplit2 & "CZang=" & ClanLeader & strSplit2 & "CIMG=" & ClanIMG & strSplit2 & "TotalEMoney=" & ClanMoney & strSplit2 & "TotalMoney=" & ClanMoney & strSplit2
Else
iNum = 3
strReturn = "Code=" & iNum & strSplit2 & "CClanMoney=0" & strSplit2 & "CTax=0" & strSplit2 & "CName=" & ClanName & strSplit2 & "CNote=" & ClanNote & strSplit2 & "CZang=" & ClanLeader & strSplit2 & "CIMG=" & ClanIMG & strSplit2 & "TotalEMoney=" & ClanMoney & strSplit2 & "TotalMoney=" & ClanMoney & strSplit2
End If
Else
RS.Close
QUERY = "SELECT ClanZang FROM CL WHERE ClanName='" & ClanSub & "'"
RS.Open QUERY, objConn, 3, 1
ClanSubLeader = RS("ClanZang").Value
If ClanSubLeader = chname Then
iNum = 4
strReturn = "Code=" & iNum & strSplit2 & "CClanMoney=0" & strSplit2 & "CTax=0" & strSplit2 & "CName=" & ClanName & strSplit2 & "CNote=" & ClanNote & strSplit2 & "CZang=" & ClanLeader & strSplit2 & "CIMG=" & ClanIMG & strSplit2
ElseIf ClanSubChief = 2 Then
iNum = 5
strReturn = "Code=" & iNum & strSplit2 & "CClanMoney=0" & strSplit2 & "CTax=0" & strSplit2 & "CName=" & ClanName & strSplit2 & "CNote=" & ClanNote & strSplit2 & "CZang=" & ClanLeader & strSplit2 & "CIMG=" & ClanIMG & strSplit2
Else
iNum = 6
strReturn = "Code=" & iNum & strSplit2 & "CClanMoney=0" & strSplit2 & "CTax=0" & strSplit2 & "CName=" & ClanName & strSplit2 & "CNote=" & ClanNote & strSplit2 & "CZang=" & ClanLeader & strSplit2 & "CIMG=" & ClanIMG & strSplit2
End If
RS.Close
End If
End If
Else
strReturn = "Code=0"
End If
Case "3" 'High Score Clan List
QUERY = "SELECT * FROM CL ORDER BY Cpoint DESC"
RS.Open QUERY, objConn, 3, 1
If Not RS.RecordCount > 0 Then
strReturn = "Code=0"
Else
Dim tSub, tSubRegiDate, tSub2, tSub3, x
strReturn = "Code=1" & strSplit
While i < RS.RecordCount
If i >= 9 Then
i = RS.RecordCount
End If
tSubRegiDate = ""
tSub2 = ""
tSub3 = 0
ClanName = RS("ClanName").Value
tSub = RS("RegiDate").Value
For x = 1 To Len(tSub)
If tSub3 = 0 Then
tSub2 = Mid(tSub,x,1)
If tSub2 <> " " Then
tSubRegiDate = tSubRegiDate & tSub2
Else
tSub3 = 1
End If
End If
Next
If Not InStr(strReturn, ClanName) > 0 And RS("Cpoint").Value > 0 Then
strReturn = strReturn & "CIMG=" & RS("MIconCnt").Value & strSplit & "CName=" & ClanName & strSplit & "CPoint=" & RS("Cpoint").Value & strSplit & "CRegistDay=" & tSubRegiDate & strSplit
End If
i = i + 1
If i <= RS.RecordCount Then
RS.MoveNext
End If
Wend
End If
RS.Close
Case Else
strReturn = "Code=104"
Response.Write(strReturn)
End Select
objConn.Close
Set objConn = Nothing
Response.Write(strReturn)
%>
I would suggest :
Disable the Secretary Katrina window. so ppls won't be able to open it.
Do it till you fix it.
Find the Secretary Katrina NPC File in GameServer\NPC and put "//" before the line that cause the window of it to open.
Avi,
That's just removing the npcs, not fixing it.. Why do I want to remove it?
So it doesn't bother your players while you work on a true solution.
Short of Gregoos' wireshark method, I would just keep trying to replicate the URLs the game.exe passes to the webserver, and figuring what it is passing that causes the script to fail, where.
That page is ASP VBScript, which means some VB knowledge would be helpful... but as we can't tell from here what line causes the error, or if it's the same line every time... debugging is going to be hard.
It is possible to reformat the string passed as a URL by game.exe, but you are probably better off making the ASP work with the game than making the game work with the ASP. (unless you want to do that for reasons of differentiation and security)
As I've said before, I'm not keen on the IIS server, so I'm not sure where it logs error information. Most servers keep a .log file somewhere, but knowing MS it's more likely to be in the Event Viewer somewhere.
I'm sure Gregoory could be much more specific. :):
-----