![]() |
Problem - Printable Version +- Mirage Source (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: General (https://mirage-engine.uk/forums/forumdisplay.php?fid=17) +---- Thread: Problem (/showthread.php?tid=479) |
Problem - halla - 16-12-2006 Ok this is from unsupported version of MS I know... its the sql version but... after I go on and make 1 npc and add it to the map... then after I close the server and try to start it back up I guess this error... --------------------------- Server --------------------------- Run-time error '3021': Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record. --------------------------- OK --------------------------- Anyone have any ideas whats causing it? - halla - 16-12-2006 I deleted the npc I made from the database and then the server loaded up... so I guess its something with the npcs table... but I didnt change anything so I dont know whats up. EDIT:: Yeah im positive now. I got on made 1 NPC. I logged off and closed the server... I then tried to start the server back up and the error is there. Also something else I found weird... I named the NPC... "NPC" and it says the name field is 20 bytes... I wouldnt think anything of this... but I got to characters table and the name there is test and it says 4 bytes.... so is it not saving the names of npc right or something? EDIT2:: Well found the error... ran the source and debugged.. Code: .FKey = CLng(RS("FKey")) Highlights that in LoadNPCs. Some reason it isnt loading it right... im not the best understand the code for MySQL but I will mess around with it... if anyone knows why the FKey isnt loading or setting right let me know,. - halla - 16-12-2006 Sorry for double post... I think I found out whats up... its trying to load all of the npcs 1 to 255... well if I made one then theres only 1 to load... so when it tries to load #2 up then it has an empty set getting the error... I guess somehow I have to findout how many there are and then have it stop at that. or something - Obsidian - 16-12-2006 Just loop it... if the NPCs name is blank, then don't load it... - halla - 16-12-2006 I was trying to check if FKey was null but I cant get that to work. Its the exact same as Items too but items work I dont get that... I looked at items and it makes them all just leaves the others blank... but npcs only makes the ones you made. I could make rows for all of them but thats a lot lol - Dragoons Master - 16-12-2006 I'm not sure if it's a problem w/ the DateBase, almost sure it is not. Probly is your code or the database is not fully w/ blank npcs. I got blank 307 and it was totaly messedup(for me). This is the sub I use: Code: Sub LoadNpcs() If your npcs table is not full you need to add every single blank npc by hand, or use this sub I did(CheckNpcs) a while ago, only once: Code: Public Sub CheckNpcs() I'm not sure if you have this sub under here. If you don't add it: Code: Public Function GetRecordCount(dbTable As String, Optional WH As String = "0") As Long - halla - 17-12-2006 Thanks I already fixed this... I added in blank records for all of them... it automatically did that for items and stuff but not npcs some reason. Anyways I got it working. |