Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

WK67

Members
  • Posts

    36
  • Joined

  • Last visited

    Never

Everything posted by WK67

  1. > i get an error in the server only when i am killed by an npc that has spells, its a rte 9 error and it hightlights this > > ``` > Select Case Spell(spellnum).Type > ``` > in npcspell player sub anyone have this issue? the npcs cast spells and everything but if they kill a player my server crashes. and for some reason if only does this if its on the first map. I know this thread is old, but I also have this problem minus the death only on first map. What's strange is in a fresh copy of EO 2.3, it's perfect. It never crashes, but in a modified version of EO 2.3 (My Modified version) it crashes on death. I've noticed it only crashes if the spell the NPC has involves healing itself. I put the code in the exact same places and everything. I can't figure it out. I've gone through the tut about 4 times now. Please, someone help! -EDIT- Well, I've found out what causes the crashes. Unlike my previous fixes and guesses, It has nothing to do with Alatar's Checkpoint system. It has to do with NPCs. If you have a NPC on the map that you get booted back to, it'll crash. Simple as that. I guess it doesn't refresh the Spell for NPCs fast enough or something. If anyone can fix this error, it'd be greatly appreciated! My way for the fix is to just have them respawn to a map with no NPCs. Use this method until someone makes a proper fix.
  2. Oh, Thanks! That makes sense. I've tried what you suggested, and it works now!
  3. NEVERMIND I FIXED IT! Who woulda thunk it'd be in ModCombat - TryPlayerAttackPlayer Heh, that seems obvious… Anyway, here's the line that was causing probs: ``` If Damage > 0 Then Call PlayerAttackPlayer(attacker, Victim, Damage) SendPlayerSound index, GetPlayerX(index), GetPlayerY(index), SoundEntity.seResource, 1 Else Call PlayerMsg(attacker, "Your attack does nothing.", BrightRed) SendPlayerSound index, GetPlayerX(index), GetPlayerY(index), SoundEntity.seResource, 1 End If End If ``` Changed it to: ``` If Damage > 0 Then Call PlayerAttackPlayer(attacker, Victim, Damage) Else Call PlayerMsg(attacker, "Your attack does nothing.", BrightRed) End If End If ``` I had added attack noises when players attacked NPCs and added it to this sub not thinking about the potential errors. Hope this helps someone with a similar prob.
  4. Ok, so here's my problem. When I go into a PvP map and have a player attack another player, I get this error: ![](http://i.imgur.com/WeYBARY.png) And this Line highlights: ![](http://i.imgur.com/2pF23N5.png) When I hover my mouse over "Player(index).x" I get this: "Player(index).x = " I can't for the life of me figure out this error or it's origins. It's so damn vague! I have added Projectiles to my game using this tutorial: [http://www.eclipseorigins.com/community/index.php?/topic/120204-eo20ranged-projectilesarrows-bullets-and-morerelease/?hl=%2Bgetplayerx+%2Bplayer%28index%29.x](http://www.eclipseorigins.com/community/index.php?/topic/120204-eo20ranged-projectilesarrows-bullets-and-morerelease/?hl=%2Bgetplayerx+%2Bplayer%28index%29.x) And what's REALLY strange is that I don't get this error when I attack a player with a projectile. This error has been there before I added projectiles so it can't be that. I dunno when this error started because I haven't had a PvP map for over a few months, and I've added many features since then. I hope somebody can help me. I've put so much time into this project and I don't want PvP's to be disable because of some Vague error. Thanks in advance.
  5. Looks, amazing!! Now I kind of wish my game was on this engine. xD
  6. Hmm. well I have 16 points in the badge stat. But for some reason if any stat loses anymore then 1 point from an equip, it makes the stat go to 1\. Strange.
  7. Well other stats it doesnt auto make it 1\. But it still doesnt keep the item from not being able to be equiped if it makes a stat go below 1\. wtff
  8. Well, now it just makes the badge stat go to 1 point no matter how many badgepoints my equip takes away. :S
  9. Well I've tested and I find that Zeno's code: ``` For I = 1 to Stats.StatsCount If Item(itemnum).Add_Stat(I) + GetPlayerStat(Index,I) < 1 Then Call PlayerMsg(index, "This item would drain all your stats", Red) End if Exit Sub Next ``` Doesn't work right. The code prevents equip If the ITEM reduces the stat at all. Instead of making it not equip only if the STAT number goes below 0. If anyone knows why please speak up. :c
  10. Wow, Thank you so much Zeno! I would put your name in the credits, but it's already in there! lol Strange. For some reason the player message isnt beng sent. I even copied a message from the requirements code, Still no message. o.e
  11. That Or I could just make it so the player have to have above a certain amount of Badgepoints. Example, This badge takes away 5 BP and lowers 1 DEF and raises 2 Attack. I would prob have to make sure the stat requirements are like: Make sure stat above 5 BP and 1 DEF. Lol, well I think Flame fixed that prob for the most part. -EDIT- I forgot requirements dont make it a specific number… Only if you have above 8 for max stat. I'm dumb.. So yeah, it didnt work.
  12. Thanks Zeno!! I dont seem to get the overflow error anymore after deleting all Items and accounts. And it seems to decrease stats now! ![:D](http://www.touchofdeathforums.com/community/public/style_emoticons//biggrin.png) Though I have one question, how would I prevent players from getting their stats below 1? Like if the equip make the stat below 1 then don't equip.
  13. So I added a new stat. It's a badge stat. I want it to work like the badge stat from the Paper Mario series. But there's no way to make an Item decrease a user's stat. So you cant lose any badge points when equiping a badge. :/ Basically I want to know if it's possible to make the "scrlStatBonus" in Items Editor to decrease a stat as well as increase it. I've tried making the scrollbar min -255 but that just gives me an overflow error. I'm stumped. Thanks! I will credit you in UMWO if you find the solution! ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons//smile.png)
  14. WK67

    Run-time error 28

    Hmm.. How do I use breakpoints and debug mode? I know you've told me before. But my memory is complete garbage. :S -EDIT- I'm a damn idiot. I had the spawn map set as a Party map. I can register accounts and login now that I made the map a safe zone. Thanks for your time, Zeno.
  15. WK67

    Run-time error 28

    So this started to appear In server. ![](http://i.imgur.com/0dMxvn1.png) And here's the line it highlights. ![](http://i.imgur.com/imoXtys.png) This makes absolutly no sense to me. Wtf is a stack space. Also, if it helps here's what I have recently changed in the server I added this: [http://www.touchofde…page__hl__spell](http://www.touchofdeathforums.com/community/index.php?/topic/106297-eo-npc-spells-v200/page__hl__spell) And I added my own Orb atribute and I fixed lblEXP glitch along with my Points item. This error only seems to appear when making a new account. I found logging in to not be a problem. Please help me! :C
  16. Thanks dude! My GFX folder shrank from 141 to barely 14mb. HUGE difference! Haven't had any errors yet either. Good work!
  17. > It might be nice to be able to specify how many points you get for a specific item of that type instead of having it at just one. Regardless, good work! That's a good idea! I dunno if I have the know how to do it.. But I'll see if I can. Also, thanks!
  18. Ok, so this is my first tutorial! Keep in mind that I'm not at all advanced with VB6\. But I have learned enough from all the tutorials around the forums that I could make this small, but cool addition. What this Item does is add a single point (Or multiple depending on your Preference). This allows players at max level too still be able to level up their stats through the "Point" item! This should work with all EO versions. The EO I'm using in this tutorial is EO 2.3. Let's begin! Client/Server Find ' Item constants And add this: Public Const ITEM_TYPE_POINTS As Byte = x (next value) Client Go to frmEditor_Item/CmdType/Properties/List and add "Points" to the list. Server In "Public Sub UseItem" add this ``` Case ITEM_TYPE_POINTS ' stat requirements For i = 1 To Stats.Stat_Count - 1 If GetPlayerRawStat(index, i) < Item(itemnum).Stat_Req(i) Then PlayerMsg index, "You do not meet the stat requirements to use this item.", BrightRed Exit Sub End If Next ' level requirement If GetPlayerLevel(index) < Item(itemnum).LevelReq Then PlayerMsg index, "You do not meet the level requirement to use this item.", BrightRed Exit Sub End If ' class requirement If Item(itemnum).ClassReq > 0 Then If Not GetPlayerClass(index) = Item(itemnum).ClassReq Then PlayerMsg index, "You do not meet the class requirement to use this item.", BrightRed Exit Sub End If End If ' access requirement If Not GetPlayerAccess(index) >= Item(itemnum).AccessReq Then PlayerMsg index, "You do not meet the access requirement to use this item.", BrightRed Exit Sub End If ' add points If GetPlayerPOINTS(index) >= 255 Then SendActionMsg GetPlayerMap(index), "Points are full!", Red, ACTIONMSG_SCROLL, GetPlayerX(index) * 32, GetPlayerY(index) * 32 Exit Sub End If Call SetPlayerPOINTS(index, GetPlayerPOINTS(index) + 1) Call TakeInvItem(index, Player(index).Inv(invNum).Num, 0) SendActionMsg GetPlayerMap(index), "+1 Point!", Yellow, ACTIONMSG_SCROLL, GetPlayerX(index) * 32, GetPlayerY(index) * 32 ' send the sound SendPlayerSound index, GetPlayerX(index), GetPlayerY(index), SoundEntity.seItem, itemnum ' send the sound SendPlayerSound index, GetPlayerX(index), GetPlayerY(index), SoundEntity.seItem, itemnum ``` And that's all! This works 100% for me on my game. Hopefully this feature is useful to you. ![:D](http://www.touchofdeathforums.com/community/public/style_emoticons//biggrin.png) P.S. If you wanna change the amount of points being given, modify these 2 lines of code to your likening Call SetPlayerPOINTS(index, GetPlayerPOINTS(index) + 1) SendActionMsg GetPlayerMap(index), "+1 Point!", Yellow, ACTIONMSG_SCROLL, GetPlayerX(index) * 32, GetPlayerY(index) * 32 Example: Call SetPlayerPOINTS(index, GetPlayerPOINTS(index) + 5) SendActionMsg GetPlayerMap(index), "+5 Points!", Yellow, ACTIONMSG_SCROLL, GetPlayerX(index) * 32, GetPlayerY(index) * 32 -EDIT- Fixed the RTE overflow thanks to Sherwin and Abhi2011
  19. Jolly good! This works now! Fantastic. Expect to see this in UMWO once I release it.
  20. I can't figure this out. I guess I'll just wait for the fix. *sigh*
  21. > Ensure the following. > > i > 1 < stats.stat_count - 1 > > target > 1 < Max_NPC As far as I can see, the first one is correct.. I dont know where the hell MAX_NPC is. Though I found MAX_MAP_NPCS which is like this: For i = 1 To MAX_MAP_NPCS Still, I dont understand why when I hover over mapnpcnum… it says "mapnpcnum = 0"... Even though The code is written like this: mapnpcnum = i... Also when i hover over "i" it shows "i = 101"... wtfffff MAYBE, if you uploaded a working version with the source.... I could see exactly what's wrong. ![:huh:](http://www.touchofdeathforums.com/community/public/style_emoticons//huh.png)
  22. Ok, I didn't quite understand what you meant.. But here's what I found. (Excuse my ignorance, I'm not very advanced with VB6 at all.) This is the line that errors: Buffer.WriteLong MapNpc(GetPlayerMap(index)).NPC(mapNpcNum).Vital(HP) When I hovered over everything I found this: (GetPlayerMap(index)) = 1 .NPC(mapNpcNum) = 0 And out of these lines of code.. I found a few that (Subscript out of Range)'d For i = 1 To Stats.Stat_Count - 1 Buffer.WriteByte .Stat(i) = (Subscript out of Range) Debug.Print .Stat(i) = (Subscript out of Range) Next i End With Also, for some reason it seems to display the stats of the first NPC in my NPC list.. Rather than the actual map NPC.. I'm very confused.
  23. I, too have this problem. I can only view some NPC's HP. Other then that, it RTE9's on me. This is very upsetting. Mainly because this feature works so well, when it works. If there is a fix I'd recommend updating the tutorial. Thanks.
×
×
  • Create New...