| Mirage Source http://miragesource.net/forums/ |
|
| [FIXED] Big bug MS3.0.3 http://miragesource.net/forums/viewtopic.php?f=201&t=4927 |
Page 1 of 1 |
| Author: | El_Dindonnier [ Mon Jan 05, 2009 10:52 pm ] |
| Post subject: | [FIXED] Big bug MS3.0.3 |
When I change : (client and server) Code: Public Const MAX_NPCS = 255 to Code: Public Const MAX_NPCS = 500 It's work, but in the client, when I add a npc in the map properties (after 255), I have a runtime error 6 out of memory. Quote: For I = 1 To MAX_MAP_NPCS Map.Npc(I) = cmbNpc(I - 1).ListIndex Next I I use a MS3.0.3 very modified, but i have the bug on a clean mirage source. Can I help me please ? Thanks you in advance. (sorry for my bad english) |
|
| Author: | deathknight [ Mon Jan 05, 2009 11:18 pm ] |
| Post subject: | Re: Big bug MS3.0.3 |
Just wanted to put this out there, I just tried this with MS4 also (just messing around) and I changed max NPCS to 500 also, changed it so its dimmed as byte, and it popped up with RTE 6 on this line Code: .Npc(i) = cmbNpc(i).ListIndex
|
|
| Author: | Doomy [ Mon Jan 05, 2009 11:21 pm ] |
| Post subject: | Re: Big bug MS3.0.3 |
is npcs a byte cause like doesnt that mean 256 is highest number also i may not know what im talking about |
|
| Author: | Matt [ Mon Jan 05, 2009 11:50 pm ] |
| Post subject: | Re: Big bug MS3.0.3 |
I looked at the topic starter's user name and saw "El_Dinosaur".. XD |
|
| Author: | Rian [ Mon Jan 05, 2009 11:59 pm ] |
| Post subject: | Re: Big bug MS3.0.3 |
MAX_NPCS needs to be stored as an integer if you want the value to be more than 255. |
|
| Author: | deathknight [ Tue Jan 06, 2009 12:21 am ] |
| Post subject: | Re: Big bug MS3.0.3 |
Sorry, thats what I meant. I changed it so it ISN'T dimmed as a byte. I did change it to integer when I tested it. I think something else in the statement is being dimmed as a byte, I just can't tell where. |
|
| Author: | Doomy [ Tue Jan 06, 2009 1:11 am ] |
| Post subject: | Re: Big bug MS3.0.3 |
Rian wrote: MAX_NPCS needs to be stored as an integer if you want the value to be more than 255. woot that means i was right and just search NPCS and see if you see anything you missed |
|
| Author: | El_Dindonnier [ Fri Jan 09, 2009 3:13 pm ] |
| Post subject: | Re: Big bug MS3.0.3 |
How to fix this bug please ? (thanks you for your help) |
|
| Author: | Matt [ Sun Jan 11, 2009 7:00 pm ] |
| Post subject: | Re: Big bug MS3.0.3 |
You have to define npcs as an integer instead of a byte.. Pay attention, that was already stated. -_- |
|
| Author: | El_Dindonnier [ Sun Jan 11, 2009 11:46 pm ] |
| Post subject: | Re: Big bug MS3.0.3 |
In a blank mirage source MS3.0.3. SERVER I change : Code: Public Const MAX_NPCS = 255 to Code: Public Const MAX_NPCS = 500 I change : Code: Type MapRec Name As String * NAME_LENGTH Revision As Long Moral As Byte Up As Integer Down As Integer Left As Integer Right As Integer Music As Byte BootMap As Integer BootX As Byte BootY As Byte Shop As Byte Indoors As Byte Tile(0 To MAX_MAPX, 0 To MAX_MAPY) As TileRec Npc(1 To MAX_MAP_NPCS) As Byte End Type to Code: Type MapRec Name As String * NAME_LENGTH Revision As Long Moral As Byte Up As Integer Down As Integer Left As Integer Right As Integer Music As Byte BootMap As Integer BootX As Byte BootY As Byte Shop As Byte Indoors As Byte Tile(0 To MAX_MAPX, 0 To MAX_MAPY) As TileRec Npc(1 To MAX_MAP_NPCS) As Integer End Type CLIENT I change : Code: Public Const MAX_NPCS = 255 to Code: Public Const MAX_NPCS = 500 I change : Code: Type MapRec Name As String * NAME_LENGTH Revision As Long Moral As Byte Up As Integer Down As Integer Left As Integer Right As Integer Music As Byte BootMap As Integer BootX As Byte BootY As Byte Shop As Byte Indoors As Byte Tile(0 To MAX_MAPX, 0 To MAX_MAPY) As TileRec Npc(1 To MAX_MAP_NPCS) As Byte End Type to Code: Type MapRec Name As String * NAME_LENGTH Revision As Long Moral As Byte Up As Integer Down As Integer Left As Integer Right As Integer Music As Byte BootMap As Integer BootX As Byte BootY As Byte Shop As Byte Indoors As Byte Tile(0 To MAX_MAPX, 0 To MAX_MAPY) As TileRec Npc(1 To MAX_MAP_NPCS) As Integer End Type I launch the server. (it's OK) I create a account and a character. (acces 5) I login, I am in the game. /mapeditor and I clic property. I choice the 256 NPC, I clic OK. I save the map and : Runtime error 6 overflow : Quote: ' :::::::::::::::::::::: ' :: Npc spawn packet :: ' :::::::::::::::::::::: If LCase(Parse(0)) = "spawnnpc" Then n = Val(Parse(1)) MapNpc(n).Num = Val(Parse(2)) 'runtime error 6 : overflow MapNpc(n).x = Val(Parse(3)) MapNpc(n).y = Val(Parse(4)) MapNpc(n).Dir = Val(Parse(5)) ' Client use only MapNpc(n).XOffset = 0 MapNpc(n).YOffset = 0 MapNpc(n).Moving = 0 Exit Sub End If Why ? help me please. (sorry for my bad english) |
|
| Author: | Matt [ Sun Jan 11, 2009 11:49 pm ] |
| Post subject: | Re: Big bug MS3.0.3 |
It would appear that you need to change the num variable to an integer in the mapnpc rec. |
|
| Author: | El_Dindonnier [ Mon Jan 12, 2009 12:07 am ] |
| Post subject: | Re: Big bug MS3.0.3 |
Matt wrote: It would appear that you need to change the num variable to an integer in the mapnpc rec. It's work ! Thanks you for your help |
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|