-
Posts
184 -
Joined
-
Last visited
Content Type
Profiles
Forums
Downloads
Everything posted by Recoil
-
JC, what are the odds that you are going to have an RSS feed posted on the site? I think it would be great because then I can read off of it on my main menu
-
I don't think it clashes at all. It actually turned out quite well. I didn't see the outer border as a shadow, just part of the design. If you are going to keep it I think it should be a darker blue than the rest of the blue in the middle (just slightly).
-
Just curious is there a limit to how much a user can upload? It never specifies that anywhere on there. I'm not sure how all of that works tbh, but it might be wise to allot a certain number of MB to each user's account...say each user can have a max of 10mb uploaded on their account.
-
Okay, here is everything for the SaveItem sub. First is how it is currently done in the engine: Dim filename As String Dim F As Long filename = Application.StartupPath & "\DataFiles\items\item" & itemNum & ".dat" F = FreeFile() FileOpen(F, filename, OpenMode.Binary, OpenAccess.Write, OpenShare.Default) FilePutObject(F, Item(itemNum).Name) FilePutObject(F, Item(itemNum).Pic) FilePutObject(F, Item(itemNum).Type) FilePutObject(F, Item(itemNum).Data1) FilePutObject(F, Item(itemNum).Data2) FilePutObject(F, Item(itemNum).Data3) FilePutObject(F, Item(itemNum).ClassReq) FilePutObject(F, Item(itemNum).AccessReq) FilePutObject(F, Item(itemNum).LevelReq) FilePutObject(F, Item(itemNum).Mastery) FilePutObject(F, Item(itemNum).Price) For i = 0 To Stats.StatCount - 1 FilePutObject(F, Item(itemNum).AddStat(i)) Next FilePutObject(F, Item(itemNum).Rarity) FilePutObject(F, Item(itemNum).Speed) FilePutObject(F, Item(itemNum).Handed) FilePutObject(F, Item(itemNum).BindType) For i = 0 To Stats.StatCount - 1 FilePutObject(F, Item(itemNum).StatReq(i)) Next FilePutObject(F, Item(itemNum).Animation) FilePutObject(F, Item(itemNum).Paperdoll) FilePutObject(F, Item(itemNum).Stackable) FileClose(F) Now, I am wanting to change that section to use my serializer: Dim itemData As Types.ItemRec = New Types.ItemRec itemData.Name = Item(itemNum).Name itemData.Pic = Item(itemNum).Pic itemData.Type = Item(itemNum).Type itemData.Data1 = Item(itemNum).Data1 itemData.Data2 = Item(itemNum).Data2 itemData.Data3 = Item(itemNum).Data3 itemData.ClassReq = Item(itemNum).ClassReq itemData.AccessReq = Item(itemNum).AccessReq itemData.LevelReq = Item(itemNum).LevelReq itemData.Mastery = Item(itemNum).Mastery itemData.Price = Item(itemNum).Price For i = 0 To Stats.StatCount - 1 itemData.AddStat(i) = Item(itemNum).AddStat(i) Next itemData.Rarity = Item(itemNum).Rarity itemData.Speed = Item(itemNum).Speed itemData.Handed = Item(itemNum).Handed itemData.BindType = Item(itemNum).BindType For i = 0 To Stats.StatCount - 1 itemData.StatReq(i) = Item(itemNum).StatReq(i) Next itemData.Animation = Item(itemNum).Animation itemData.Paperdoll = Item(itemNum).Paperdoll itemData.Stackable = Item(itemNum).Stackable Dim filePath As String = Application.StartupPath & "\DataFiles\items\item" & itemNum & ".ori" ModObjectSerializer.SerializeObject(filePath, itemData) When it hits the first For loop it comes up with the error. Until it hits that everything else is going fine from what I can tell. Since I deleted all of my items there is nothing in the folder. I'm also changing the extension from .dat to .ori so that eventually I can assign these to open in an external editor.
-
This is the way an items stats are currently saved: For i = 0 To Stats.StatCount - 1 FilePutObject(F, Item(itemNum).AddStat(i)) Next I am trying set this up to to convert to xml: For i = 0 To Stats.StatCount - 1 itemData.AddStat(i) = Item(itemNum).AddStat(i) next This is throwing a null exception and I'm not sure how to set this to work. I already have my serializer/deserializer set to handle the stuff that needs to be saved.
-
All I want to do at first is draw the background image, the menu panel, and 2 bars that are going to be used for buttons. I will wrk out the threading on all this later, and maybe a better way to display it without a black screen initially. I am initializing this stuff first in the same spot everything else is initialized. I am calling the Render_Menu() at the top of the UpdateUI, before any of the panels that are there are drawn. #Region "Imports" Imports System.Drawing Imports System.Windows.Forms Imports System.IO Imports OrionRevampedGeneral.Core.Constants Imports OrionRevampedGeneral.Core.Enumerations Imports SFML.Graphics Imports SFML.Window #End Region Module ClientMenu #Region "Constants" Public Const MENUWINDOW_PATH As String = "Menu\" #End Region #Region "Globals" Public MainMenuIsVisible As Boolean Public IpConfigIsVisible As Boolean Public CreditsIsVisible As Boolean Public LoginIsVisible As Boolean Public NewCharIsVisible As Boolean Public NewAccountIsVisible As Boolean Public MenuWindow As RenderWindow Public Background As OrionGfxControl Public MenuBackground As OrionGfxControl Public HeaderBar As OrionGfxControl Public SectionBar As OrionGfxControl Public MenuButton As OrionGfxControl #End Region #Region "Initilization" Public Sub InitMenuGraphics() 'MenuWindow = New RenderWindow(frmMenu.MenuScreen.Handle) Background = New OrionGfxControl(False) If FileExist(Application.StartupPath & GFX_PATH & MENUWINDOW_PATH & "Background" & GFX_EXT) Then Dim bmp As New Bitmap(Application.StartupPath & GFX_PATH & MENUWINDOW_PATH & "Background" & GFX_EXT) Background.Init(bmp) End If MenuBackground = New OrionGfxControl(False) If FileExist(Application.StartupPath & GFX_PATH & MENUWINDOW_PATH & "MenuBackground" & GFX_EXT) Then Dim bmp As New Bitmap(Application.StartupPath & GFX_PATH & MENUWINDOW_PATH & "MenuBackground" & GFX_EXT) MenuBackground.Init(bmp) End If HeaderBar = New OrionGfxControl(False) If FileExist(Application.StartupPath & GFX_PATH & MENUWINDOW_PATH & "HeaderBar" & GFX_EXT) Then Dim bmp As New Bitmap(Application.StartupPath & GFX_PATH & MENUWINDOW_PATH & "HeaderBar" & GFX_EXT) HeaderBar.Init(bmp) End If SectionBar = New OrionGfxControl(False) If FileExist(Application.StartupPath & GFX_PATH & MENUWINDOW_PATH & "SectionBar" & GFX_EXT) Then Dim bmp As New Bitmap(Application.StartupPath & GFX_PATH & MENUWINDOW_PATH & "SectionBar" & GFX_EXT) SectionBar.Init(bmp) End If MenuButton = New OrionGfxControl(False) If FileExist(Application.StartupPath & GFX_PATH & MENUWINDOW_PATH & "Button" & GFX_EXT) Then Dim bmp As New Bitmap(Application.StartupPath & GFX_PATH & MENUWINDOW_PATH & "Button" & GFX_EXT) MenuButton.Init(bmp) End If End Sub #End Region #Region "Drawing" Public Sub DrawMainMenu() ' Draw all main menu controls here MenuBackground.DrawControl(MenuWindow, MenuBackground.ControlLocation.X, MenuBackground.ControlLocation.Y) HeaderBar.DrawControl(MenuWindow, MenuBackground.ControlLocation.X, (MenuBackground.ControlLocation.Y + MenuBackground.ControlLocation.Height) - (HeaderBar.ControlLocation.Height)) SectionBar.DrawControl(MenuWindow, (MenuWindow.Size.X / 2) - SectionBar.ControlLocation.Width / 2, MenuBackground.ControlLocation.Y + 10) End Sub Public Sub DrawIpConfig() End Sub Public Sub DrawCredits() End Sub Public Sub DrawLogin() End Sub Public Sub DrawNewChar() End Sub Public Sub DrawNewAccount() End Sub #End Region #Region "Rendering" Public Sub Render_Menu() If InGame Then Exit Sub DoEvents() MenuWindow.DispatchEvents() MenuWindow.Clear(SFML.Graphics.Color.Black) Background.DrawControl(MenuWindow, 0, 0) If MainMenuIsVisible Then DrawMainMenu() End If If IpConfigIsVisible Then 'DrawIpConfig() End If If CreditsIsVisible Then 'DrawCredits() End If If LoginIsVisible Then 'DrawLogin() End If If NewCharIsVisible Then 'DrawNewChar() End If If NewAccountIsVisible Then 'DrawNewAccount() End If MenuWindow.Display() End Sub #End Region End Module Right now this is slow, and very buggy. The background draws as expected, but the panel background draws down at the bottom right, then shifts into place...then other controls pop onto it.
-
So I actually got this on my own for once. When the player moves this moves in the inverse direction slightly to provide a parallax effect. For this purpose I am going to refer to our Fog rendering that moves: Public Sub DrawFog() If Map.Moral = MapMoralIndoors Then Exit Sub Dim horz As Integer = 0 Dim vert As Integer = 0 For x = TileView.left To TileView.right + 1 For y = TileView.top To TileView.bottom + 1 If IsValidMapPoint(x, y) Then horz = -x vert = -y End If Next Next Dim tmpSprite As Sprite tmpSprite = New Sprite(FogGfx) tmpSprite.TextureRect = New IntRect(0, 0, frmMainGame.GameScreen.Width + 200, frmMainGame.GameScreen.Height + 200) tmpSprite.Color = New SFML.Graphics.Color(255, 255, 255, 150) tmpSprite.Position = New Vector2f((horz * 2.5) + 50, (vert * 3.5) + 50) GameWindow.Draw(tmpSprite) ' End Sub The original image was 256x256 and I Photoshopped it to 3200x2400. It's really big but now it won't be clipped off on the edges of the screen, else I would have to draw this 9 times to account for different resolutions. This moves in a somewhat jotty movement, and not very smooth, but it is not noticeable on fog. This only moves along with the players movement as long as the player is in the middle of the X,Y coordinates. If the player reaches those boundaries then this just ceases to move. Also, on something like fog or clouds it would be neat to have a slowly scrolling image that moves across the screen...I'm at a loss on that one though, because I have no clue how to loop a moving image. I'm hoping to get some advice so I don't have such static values for the image, and instead can use better calculations in moving the image.
-
When I remove the call from AddText it will not display anything on the server window.
-
Sorry, it is being called from AddText()
-
I guess I didn't indicate that it is marked <-HERE on line 13 from the bottom. Is this what you need from the callstack?
-
This was happening periodically before the update changes. Now it happens all the time. I can bypass the exception, but there has to be a way to keep it from happening. I have no idea what to do though. Sub UpdateUI() If ConsoleText <> frmServer.txtText.Text Then frmServer.txtText.Text = ConsoleText frmServer.txtText.SelectionStart = frmServer.txtText.TextLength frmServer.txtText.ScrollToCaret() End If If NeedToUpDatePlayerList = True Then UpdateCaption() For i = 1 To MaxPlayers If Not Clients(i) Is Nothing Then If Not Clients(i).Socket Is Nothing Then If Clients(i).Socket.Connected Then frmServer.lstView.Items(i - 1).SubItems(1).Text = Clients(i).IP If Player(i).Login <> "" Then frmServer.lstView.Items(i - 1).SubItems(2).Text = Player(i).Login If Player(i).Name <> "" Then frmServer.lstView.Items(i - 1).SubItems(3).Text = Player(i).Name Else frmServer.lstView.Items(i - 1).SubItems(3).Text = "" End If Else frmServer.lstView.Items(i - 1).SubItems(2).Text = "" frmServer.lstView.Items(i - 1).SubItems(3).Text = "" End If Else frmServer.lstView.Items(i - 1).SubItems(1).Text = "" frmServer.lstView.Items(i - 1).SubItems(2).Text = "" frmServer.lstView.Items(i - 1).SubItems(3).Text = "" End If Else frmServer.lstView.Items(i - 1).SubItems(1).Text = "" ' <-HERE frmServer.lstView.Items(i - 1).SubItems(2).Text = "" frmServer.lstView.Items(i - 1).SubItems(3).Text = "" End If Else frmServer.lstView.Items(i - 1).SubItems(1).Text = "" frmServer.lstView.Items(i - 1).SubItems(2).Text = "" frmServer.lstView.Items(i - 1).SubItems(3).Text = "" End If Next NeedToUpDatePlayerList = False End If End Sub
-
This was happening periodically before the update changes. Now it happens all the time. I can bypass the exception, but there has to be a way to keep it from happening. I have no idea what to do though. Sub UpdateUI() If ConsoleText <> frmServer.txtText.Text Then frmServer.txtText.Text = ConsoleText frmServer.txtText.SelectionStart = frmServer.txtText.TextLength frmServer.txtText.ScrollToCaret() End If If NeedToUpDatePlayerList = True Then UpdateCaption() For i = 1 To MaxPlayers If Not Clients(i) Is Nothing Then If Not Clients(i).Socket Is Nothing Then If Clients(i).Socket.Connected Then frmServer.lstView.Items(i - 1).SubItems(1).Text = Clients(i).IP If Player(i).Login <> "" Then frmServer.lstView.Items(i - 1).SubItems(2).Text = Player(i).Login If Player(i).Name <> "" Then frmServer.lstView.Items(i - 1).SubItems(3).Text = Player(i).Name Else frmServer.lstView.Items(i - 1).SubItems(3).Text = "" End If Else frmServer.lstView.Items(i - 1).SubItems(2).Text = "" frmServer.lstView.Items(i - 1).SubItems(3).Text = "" End If Else frmServer.lstView.Items(i - 1).SubItems(1).Text = "" frmServer.lstView.Items(i - 1).SubItems(2).Text = "" frmServer.lstView.Items(i - 1).SubItems(3).Text = "" End If Else frmServer.lstView.Items(i - 1).SubItems(1).Text = "" ' <-HERE frmServer.lstView.Items(i - 1).SubItems(2).Text = "" frmServer.lstView.Items(i - 1).SubItems(3).Text = "" End If Else frmServer.lstView.Items(i - 1).SubItems(1).Text = "" frmServer.lstView.Items(i - 1).SubItems(2).Text = "" frmServer.lstView.Items(i - 1).SubItems(3).Text = "" End If Next NeedToUpDatePlayerList = False End If End Sub
-
This was happening periodically before the update changes. Now it happens all the time. I can bypass the exception, but there has to be a way to keep it from happening. I have no idea what to do though. Sub UpdateUI() If ConsoleText <> frmServer.txtText.Text Then frmServer.txtText.Text = ConsoleText frmServer.txtText.SelectionStart = frmServer.txtText.TextLength frmServer.txtText.ScrollToCaret() End If If NeedToUpDatePlayerList = True Then UpdateCaption() For i = 1 To MaxPlayers If Not Clients(i) Is Nothing Then If Not Clients(i).Socket Is Nothing Then If Clients(i).Socket.Connected Then frmServer.lstView.Items(i - 1).SubItems(1).Text = Clients(i).IP If Player(i).Login <> "" Then frmServer.lstView.Items(i - 1).SubItems(2).Text = Player(i).Login If Player(i).Name <> "" Then frmServer.lstView.Items(i - 1).SubItems(3).Text = Player(i).Name Else frmServer.lstView.Items(i - 1).SubItems(3).Text = "" End If Else frmServer.lstView.Items(i - 1).SubItems(2).Text = "" frmServer.lstView.Items(i - 1).SubItems(3).Text = "" End If Else frmServer.lstView.Items(i - 1).SubItems(1).Text = "" frmServer.lstView.Items(i - 1).SubItems(2).Text = "" frmServer.lstView.Items(i - 1).SubItems(3).Text = "" End If Else frmServer.lstView.Items(i - 1).SubItems(1).Text = "" ' <-HERE frmServer.lstView.Items(i - 1).SubItems(2).Text = "" frmServer.lstView.Items(i - 1).SubItems(3).Text = "" End If Else frmServer.lstView.Items(i - 1).SubItems(1).Text = "" frmServer.lstView.Items(i - 1).SubItems(2).Text = "" frmServer.lstView.Items(i - 1).SubItems(3).Text = "" End If Next NeedToUpDatePlayerList = False End If End Sub
-
This was happening periodically before the update changes. Now it happens all the time. I can bypass the exception, but there has to be a way to keep it from happening. I have no idea what to do though. Sub UpdateUI() If ConsoleText <> frmServer.txtText.Text Then frmServer.txtText.Text = ConsoleText frmServer.txtText.SelectionStart = frmServer.txtText.TextLength frmServer.txtText.ScrollToCaret() End If If NeedToUpDatePlayerList = True Then UpdateCaption() For i = 1 To MaxPlayers If Not Clients(i) Is Nothing Then If Not Clients(i).Socket Is Nothing Then If Clients(i).Socket.Connected Then frmServer.lstView.Items(i - 1).SubItems(1).Text = Clients(i).IP If Player(i).Login <> "" Then frmServer.lstView.Items(i - 1).SubItems(2).Text = Player(i).Login If Player(i).Name <> "" Then frmServer.lstView.Items(i - 1).SubItems(3).Text = Player(i).Name Else frmServer.lstView.Items(i - 1).SubItems(3).Text = "" End If Else frmServer.lstView.Items(i - 1).SubItems(2).Text = "" frmServer.lstView.Items(i - 1).SubItems(3).Text = "" End If Else frmServer.lstView.Items(i - 1).SubItems(1).Text = "" frmServer.lstView.Items(i - 1).SubItems(2).Text = "" frmServer.lstView.Items(i - 1).SubItems(3).Text = "" End If Else frmServer.lstView.Items(i - 1).SubItems(1).Text = "" ' <-HERE frmServer.lstView.Items(i - 1).SubItems(2).Text = "" frmServer.lstView.Items(i - 1).SubItems(3).Text = "" End If Else frmServer.lstView.Items(i - 1).SubItems(1).Text = "" frmServer.lstView.Items(i - 1).SubItems(2).Text = "" frmServer.lstView.Items(i - 1).SubItems(3).Text = "" End If Next NeedToUpDatePlayerList = False End If End Sub
-
This was happening periodically before the update changes. Now it happens all the time. I can bypass the exception, but there has to be a way to keep it from happening. I have no idea what to do though. Sub UpdateUI() If ConsoleText <> frmServer.txtText.Text Then frmServer.txtText.Text = ConsoleText frmServer.txtText.SelectionStart = frmServer.txtText.TextLength frmServer.txtText.ScrollToCaret() End If If NeedToUpDatePlayerList = True Then UpdateCaption() For i = 1 To MaxPlayers If Not Clients(i) Is Nothing Then If Not Clients(i).Socket Is Nothing Then If Clients(i).Socket.Connected Then frmServer.lstView.Items(i - 1).SubItems(1).Text = Clients(i).IP If Player(i).Login <> "" Then frmServer.lstView.Items(i - 1).SubItems(2).Text = Player(i).Login If Player(i).Name <> "" Then frmServer.lstView.Items(i - 1).SubItems(3).Text = Player(i).Name Else frmServer.lstView.Items(i - 1).SubItems(3).Text = "" End If Else frmServer.lstView.Items(i - 1).SubItems(2).Text = "" frmServer.lstView.Items(i - 1).SubItems(3).Text = "" End If Else frmServer.lstView.Items(i - 1).SubItems(1).Text = "" frmServer.lstView.Items(i - 1).SubItems(2).Text = "" frmServer.lstView.Items(i - 1).SubItems(3).Text = "" End If Else frmServer.lstView.Items(i - 1).SubItems(1).Text = "" ' <-HERE frmServer.lstView.Items(i - 1).SubItems(2).Text = "" frmServer.lstView.Items(i - 1).SubItems(3).Text = "" End If Else frmServer.lstView.Items(i - 1).SubItems(1).Text = "" frmServer.lstView.Items(i - 1).SubItems(2).Text = "" frmServer.lstView.Items(i - 1).SubItems(3).Text = "" End If Next NeedToUpDatePlayerList = False End If End Sub
-
So yeah, when we make the map a smaller size everything is fine...but not making it larger. We are receiving issues in 2 different spots. Damian's error is under here: Public Sub DrawMapTile(ByVal locX As Long, ByVal locY As Long) Dim i As Long Dim srcrect As New Rectangle(0, 0, 0, 0) Dim tmpSprite As Sprite If GettingMap Then Exit Sub With Map.Tile(locX, locY) For i = Enumerations.MapLayer.Ground To Enumerations.MapLayer.Mask2 ' skip tile if tileset isn't set ' Here If .Layer(i).Tileset > 0 Then With srcrect .X = Map.Tile(locX, locY).Layer(i).X * 32 .Y = Map.Tile(locX, locY).Layer(i).Y * 32 .Width = 32 .Height = 32 End With tmpSprite = New Sprite(TileSetTexture(.Layer(i).Tileset)) tmpSprite.TextureRect = New IntRect(srcrect.X, srcrect.Y, srcrect.Width, srcrect.Height) tmpSprite.Position = New Vector2f(ConvertMapX(locX * PIC_X), ConvertMapY(locY * PIC_Y)) GameWindow.Draw(tmpSprite) End If Next End With End Sub Mine is under here: Public Sub SendMap() Dim X As Long Dim Y As Long Dim i As Long Dim data() As Byte Dim Buffer As ByteBuffer Buffer = New ByteBuffer CanMoveNow = False Buffer.WriteString(Trim$(Map.Name)) Buffer.WriteString(Trim$(Map.Music)) Buffer.WriteLong(Map.Moral) Buffer.WriteLong(Map.Weather) Buffer.WriteLong(Map.Tileset) Buffer.WriteLong(Map.Up) Buffer.WriteLong(Map.Down) Buffer.WriteLong(Map.Left) Buffer.WriteLong(Map.Right) Buffer.WriteLong(Map.BootMap) Buffer.WriteLong(Map.BootX) Buffer.WriteLong(Map.BootY) Buffer.WriteLong(Map.MaxX) Buffer.WriteLong(Map.MaxY) For i = 1 To MaxMapNpcs Buffer.WriteLong(Map.Npc(i)) Next For X = 0 To Map.MaxX For Y = 0 To Map.MaxY Buffer.WriteLong(Map.Tile(X, Y).Data1) Buffer.WriteLong(Map.Tile(X, Y).Data2) Buffer.WriteLong(Map.Tile(X, Y).Data3) Buffer.WriteLong(Map.Tile(X, Y).DirBlock) For i = 0 To MapLayer.LayerCount - 1 ' Here Buffer.WriteLong(Map.Tile(X, Y).Layer(i).Tileset) Buffer.WriteLong(Map.Tile(X, Y).Layer(i).X) Buffer.WriteLong(Map.Tile(X, Y).Layer(i).Y) Next Buffer.WriteLong(Map.Tile(X, Y).Type) Next Next data = Buffer.ToArray Buffer = New ByteBuffer Buffer.WriteLong(ClientPackets.CMapData) Buffer.WriteBytes(Compress(data)) SendData(Buffer.ToArray()) Buffer = Nothing End Sub I know it has something to do with trying to change the size of the map array in memory, but I have no clue on how to fix. Apparently I am unable to redim the sizes in these locations. We needs helpz plz.
-
This second error occurs when I hit the exit button. The connection looks like it has been severed, but the server is still trying to access it: ClientTCP: Sub OnReceive(ar As IAsyncResult) Try Dim byteAmt As Integer = myStream.EndRead(ar)
-
I am going to use this thread for help fixing all these socket errors. Sub connectCallback(asyncConnect As IAsyncResult) Try PlayerSocket.EndConnect(asyncConnect) Gets called by this sub: Public Sub Connect() If Not PlayerSocket Is Nothing Then ' 174 & 292 modGeneral Try If PlayerSocket.Connected Or SckConnecting Then Exit Sub PlayerSocket.Close() PlayerSocket = Nothing Catch ex As Exception End Try End If PlayerSocket = New TcpClient() PlayerSocket.ReceiveBufferSize = 4096 PlayerSocket.SendBufferSize = 4096 PlayerSocket.NoDelay = False ReDim asyncBuff(8192) PlayerSocket.BeginConnect(Options.Ip, Options.Port, New AsyncCallback(AddressOf connectCallback), PlayerSocket) SckConnecting = True End Sub Which gets called by this sub. It keeps checking if the server is open, then enables the Play button. If I just ping the IP address it is always going to show that the server machine is available, not if the server program is actually running. Private Sub tmrConnect_Tick(ByVal sender As Object, ByVal e As EventArgs) Handles tmrConnect.Tick Static i As Long If IsConnected() Then lblServerStatus.ForeColor = Color.Green lblServerStatus.Text = "Online" Else lblServerStatus.ForeColor = Color.Red i = i + 1 If i = 5 Then Connect() lblServerStatus.Text = "Reconnecting" i = 0 Else lblServerStatus.Text = "Offline" End If End If End Sub I can ignore them, and the server works. But I need to weed through all of these errors when all exceptions are turned on.
-
In my abandon mouse up event I am doing this: For i = PageIndex * 10 + 1 To PageIndex * 10 + 1 + 9 InInfoQuest = False PlayerHandleQuest((i), 2) 'Exit For Next I am trying to send the selected quest index to the server to remove the quest log item from the list, but I am pulling null exceptions. Other ways we have tried it always says that quest 1 has been cancelled each time, but that remains in the list as well as the one we are trying to delete. We needz help.
-
Before I jack up my whole VSO project again, I am trying to remove the tmpItem and tmpBank panels, and just draw straight to the screen. Right now the following code is allowing me to still change slots, but it is not drawing the item while I am moving them: Public Sub DrawInventoryItem(ByVal locX As Long, ByVal locY As Long) Dim rec As Rectangle, recPos As Rectangle Dim itemnum As Long, itempic As Long itemnum = GetPlayerInvItemNum(MyIndex, DragInvSlotNum) 'TmpItemWindow.Clear() 'ToSFMLColor(frmMainGame.pnlTmpInv.BackColor)) If itemnum > 0 And itemnum <= MaxItems Then itempic = Item(itemnum).Pic If itempic = 0 Then Exit Sub With rec .Y = 0 .Height = PIC_Y .X = 0 'ItemsGFXInfo(itempic).width ' / 2 .Width = PIC_X End With With recPos .Y = 0 .Height = PIC_Y .X = 0 .Width = PIC_X End With ItemIcons(itempic).DrawControl(GameWindow, recPos.X, recPos.Y) 'With frmMainGame.pnlTmpInv ' .Top = locY - 16 ' .Left = locX - 16 ' .Visible = True ' .BringToFront() 'End With End If 'TmpItemWindow.Display()
-
I have had to modify things slightly to only show 10 quests instead of 11 with a (9). At the bottom I am doing this in the mouse up event: For i = PageIndex * 10 + 1 To PageIndex * 10 + 1 + 9 If QuestListButton1.ControlLocation.Contains(e.Location) Then QuestListButton1.MouseIsOver = False ' Display info window ' #HERE AskQuest(Quest(i).Name, Quest(i).QuestDesc, "", "", True) ' AskQuest(ByVal qName As String, ByVal qText As String, ByVal qAcceptText As String, ByVal qDeclineText As String, Optional ByVal qNew As Boolean = True) End If ...more button codes... Which is supposed to replace: Dim newLinePos As Integer = QuestItemWindow.ControlLocation.Y + QuestItemWindow.Location.Y + 2 dim y = 0 'This is the position in the list you are drawing For i = PageIndex * 10 + 1 to PageIndex * 10 + 1 + 10 if (MouseX >= QuestItemWindow.ControlLocation.X + 1 and MouseX <= QuestItemWindow.ControlLocation.X + 1 + QUESTITEMWINDOWWIDTH) then if (MouseY >= newLinePos + y * ChatLineSpacing and MouseY <= newLinePos + y * ChatLineSpacing + ChatLineSpacing) then 'Clicked on quest number i do stuff and then exit sub end if end if y = y + 1 next At the top I have declared PageIndex As Integer = 0. So right now when I click on one of the buttons I have added as a backing to the text it will display the info panel but it is not displaying the name or the text. I have copied the code that I am using for when the quest is given and only changed the name, pretty much identical code.
-
Yay, the first 10 consecutive posts in a forum I should get a brownie, or a shirt When I draw this text to the screen, how on earth do I select the index of it so that I can bring up the info panel? I need to get it by the index or name because this list will be scrollable >100 quests. Public Sub DrawQuestLogWindow() If Not InGame Then Exit Sub QuestLogWindow.DrawControl(GameWindow, (frmMainGame.GameScreen.Width - QuestLogWindow.ControlLocation.Width) - ScreenPadding, (frmMainGame.GameScreen.Height - QuestLogWindow.ControlLocation.Height) - ScreenPadding) QuestItemWindow.DrawControl(GameWindow, QuestLogWindow.ControlLocation.X + 20, QuestLogWindow.ControlLocation.Y + 20) Dim newLinePos As Integer = QuestItemWindow.ControlLocation.Y + QuestItemWindow.Location.Y + 2 For i = 1 To QuestCount DrawText(QuestItemWindow.ControlLocation.X + 2, newLinePos, QuestList(i), SFML.Graphics.Color.Black, SfmlChatFont, FONT_CHAT_SIZE, GameWindow) newLinePos += ChatLineSpacing Next QuestInfoButton.DrawControl(GameWindow, (QuestLogWindow.ControlLocation.X + (QuestLogWindow.ControlLocation.Width / 2)) - QuestInfoButton.ControlLocation.Width / 2, (QuestLogWindow.ControlLocation.Y + QuestLogWindow.ControlLocation.Height) - (QuestInfoButton.ControlLocation.Height) - WindowPadding) QuestLogDownButton.DrawControl(GameWindow, QuestItemWindow.ControlLocation.X + QuestItemWindow.ControlLocation.Width + 10, (QuestItemWindow.ControlLocation.Y + QuestItemWindow.ControlLocation.Height) - QuestLogDownButton.ControlLocation.Height) QuestLogUpButton.DrawControl(GameWindow, QuestItemWindow.ControlLocation.X + QuestItemWindow.ControlLocation.Width + 10, QuestLogWindow.ControlLocation.Y + 20) End Sub http://i61.tinypic.com/2j2c215.jpg[/img]
-
That is what I figured. I think we are probably just going to organize them into single type sheets...like the first couple be for grasses. We are going to space them by a tile so they don't look so crowded and see how that works. It would be easier to look at 2 tile sheets of images to see if there are any duplicates than to have to search all of them.
-
I already had a general idea of how to rip individual tiles out, but I am referring to the conversion inside of the engine itself. Right now it is drawing the (x/y) location of (i) tilesheet onto a map coordinate per layer (i). This is moderately confusing just looking at, let alone trying to see if converting would be a worthwhile, and popular choice. We do have some other ideas as far as editing and grouping tile types onto sheets, but I was looking at this as maybe an alternative.
