Jump to content

Striped Fish2

Members
  • Content Count

    30
  • Joined

  • Last visited

Everything posted by Striped Fish2

  1. Execute(IfStatementCode) 'The error comes from this line
  2. I have a subroutine I have written and when I call it I get this error expected end of statement. Here is the code for the subroutine: Public Sub CreateLinks(xmlcode)set Hero = new cHeroSet XML = Server.Createobject("MSXML2.DomDocument.6.0")XML.LoadXML(xmlcode)endoflinks=0Dim oNodeDo until endoflinks=1For each oNode in XML.SelectNodes("/City/Links/Link")'Checks for the end of links tag and if it finds it exit the loop.If oNode.text = "END OF LINKS" thenendoflinks=1exit subEnd IfsDestination = oNode.getAttribute("destination")'Checks for the header attributeIf sDestination = "#HEADER#" thenEv
  3. I am trying to make an admin panel for my game that will let you upload files directly to the game so that they can be used in the code: However I keep getting a 500 internal server error, and it won't tell me what the error is (I had this problem with godaddy before they don't give the error code, I spent months following forum posts from people there and couldn't get it working) So I don't know what is wrong here is my code: imageuploader.asp (A snippet from the form page) <%If Admin="Yes" thenresponse.write "<html><head><title>Image Uploader</title></head>
  4. I have a very complicated check for my game designed to see if the session for whether the quest tracker is hidden or not is defined or undefined. Then if you want to change it you have a querystring that you add to the URL to tell it to update the Session to the value you put in the querystring. Here is my code that I crafted up to do this, the issue is I get a syntax error and I am not sure of any other way to do this: <%'This is an include page that defines variables and common functions that will be used on every page.'This page was created by Glorfindel on October 27, 2011'define the
  5. Oh well I'm actually planning on writing it as a computer application in Visual Basic because I want to eventaully add voice recognition to it. I'm just building a prototype in PHP to get all my thoughts together and come up with all the features.Anyway I have another problem I decided to work on it on a different computer because PHP was acting odd on my Desktop and taking 91% of the processor. I can write to the file but I can't read from it. Here's my code for the index.php page. Everytime I run it says the page has exceeded the 30 seconds and timed out. <?phpecho "<html><head&
  6. I've been playing with php and trying to write a simple AI program that will learn things you tell it and will store the stuff in text files. Anyway I am having an issue writing to the file I don't get a 500 it just doesn't write anything to the file. Also how do I make line breaks? Oh and how do I redirect to another page?Here's my code: <?php//This array shows the possible greetings a user can type in.$greetings[0]="HI";$greetings[1]="HEY";$greetings[2]="HELLO";$usercommand=$_GET["command"];$command = strtoupper($usercommand);If ($command==$greetings[0] OR $command==$greetings[1] OR $com
  7. Okay I am trying to write functions to reduce the amount of connections to the database and make my code simpler and shorter. So I have created a file that will be included that has some of the functions I have been testing out.This is the error I get And here is the code:<%'Functions for combat written by Glorfindel on August 21, 2011Function openconnection(database)set conn=Server.CreateObject("ADODB.Connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"conn.Open "" & database & ""End FunctionFunction MonsterHP(ID)openconnection("C:\Databases\DragonKwest.mdb")set rs = Server.Creat
  8. function HideMenu {document.getElementById("Menu").style="visibility:hidden";} When run it doesn't hide the element and the divider I am using had the id of Menu. I don't understand what's wrong. TIA.
  9. Okay I am working on a game and in my database there's accounts and there characters under each account. I use the Acc field to link that character with the id of an account. The problem is when creating a new character. The Acc field is a number field. And the ID variable (which is placed into the Acc field) is a string. I know this is got to be the problem because when I troubleshooted I tested ID=1 and that worked. But this has to work for everyone. So I need to know a function that converts a string to a number. After searching on the internet I found CInt but it didn't seem to work. I am
  10. Okay it says there is a loop without do, but I have do in the code in the correct format so I am confused. Here is the error and code:Error Microsoft VBScript compilation error '800a040e''loop' without 'do'/LoginCharacter.asp, line 121loop^ Code: <%dim IDID=Request.querystring("ID")%><%set conn=Server.CreateObject("ADODB.Connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"conn.Open "C:\inetpub\wwwroot\DragonKwest.mdb"set rs = Server.CreateObject("ADODB.recordset")rs.Open "SELECT Name FROM Characters WHERE ID = " & ID & "", conndo until rs.EOF for each x in rs.Fields Respons
  11. Okay I figured out the comma issue. And thanks for telling me about the missing quote. I tried it now and it works.
  12. Oh that's what you mean. Okay I did that and it returns this: INSERT INTO Characters ([Name],[Acc],Race,[Turns],[Gold],[lvl],Gender,[HP],Hitpoints,[num_of_kills],[Portrait],expierence,[XP],energypoints,[EP],att1,att2,[STR],[RAN],[H2H],[MGR],[DODGE],[PARRY],[ARMOUR],lsp,[equipaccessory],[Date_Registered],[last-logged],[equipbow],[equipsword]) VALUES ('TestCharacter','Elf',50,200,1,'Male',25,25,0,'images/Portraits/elf-male.png',0,20,10,10,'Strong Shot','Broad Attack,18,93,60,38,83,55,0,'dragoth/tutorial.asp','empty',#3/3/2011 4:30:37 PM#,#3/3/2011 4:30:37 PM#,'empty','empty') I noticed there w
  13. Sorry I am kind of new to server side scripting. So I apologize if my question sounds silly, but how do you do that?
  14. Okay I looked through the list of reserved words and none of them matched what I had so I am good there. Then I removed "on error resume next". Now I have added an error if statement. Here is my code: <%set conn=Server.CreateObject("ADODB.Connection") conn.provider="Microsoft.Jet.OLEDB.4.0"conn.open "C:\inetpub\wwwroot\DragonKwest.mdb"name=Request.Querystring("name")race=Request.Querystring("race")gender=Request.Querystring("gender")ID=Request.cookies("ID")sql="INSERT INTO Characters ([Name],[Acc],Race,[Turns],[Gold],[lvl],Gender,[HP],Hitpoints,[num_of_kills],[Portrait],"sql=sql & "exp
  15. I'm having an issue adding a record to a database. I double checked the fieldnames but they are all correct I'm thinking one of my fields could possibly be a keyword but I am not sure. Oh and experience is meant to be spelled wrong because I was lazy when I originally created the table and now have so many pages that use that field name that I don't feel like changing it. Here is my code. <%set conn=Server.CreateObject("ADODB.Connection") conn.provider="Microsoft.Jet.OLEDB.4.0"conn.open "C:\inetpub\wwwroot\DragonKwest.mdb"name=Request.Querystring("name")race=Request.Querystring("race")gend
  16. It's on a hosted website. So I can't change the settings.
  17. Okay every time I run this code I with all the correct variables and querystrings in place I get an error. I checked for silly mistakes but I can't find any. Can some one show me where my code is wrong? Here it is: <%user=Request.Cookies("usernamechar")item=Request.Querystring("item")thetype=Request.Querystring("type")thetype2="equip" & thetype & ""message1="Item%20could%20not%20be%20equipped"message2="because%20there%20is%20already%20an%20item%20in%20that%20slot"set conn=Server.CreateObject("ADODB.Connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"conn.Open "D:\Hosting\5230803\ht
×
×
  • Create New...