Author Topic: Getting Disconnected(Duplicates are not allowed)  (Read 5641 times)

0 Members and 1 Guest are viewing this topic.

Offline BlacklistedTopic starter

  • Jr. Member
  • **
  • Posts: 75
  • Activity:
    0%
  • Reputation Power: 2
  • Blacklisted has no influence.
  • Respect: +13
  • Referrals: 0
    • View Profile
Getting Disconnected(Duplicates are not allowed)
« on: May 31, 2016, 02:38:35 PM »
0
i am trying out some simple code to cast consecrate weapon but I keep getting disconnected after the second cast of the spell with the message "Duplicates are not allowed"

The call stack shows

Code: [Select]
An exception raised at 23:33:40:611
Duplicates not allowed
(00882C80){Stealth.exe } [00C83C80] ClassCharacter.{System.Generics.Collections}TDictionary<System.Word,ScriptTypes.TBuffIcon>.Add (Line 1846, "System.Generics.Collections.pas")
Call stack:
  (00882C7B){Stealth.exe } [00C83C7B] ClassCharacter.{System.Generics.Collections}TDictionary<System.Word,ScriptTypes.TBuffIcon>.Add (Line 1844, "System.Generics.Collections.pas")
  (008794F9){Stealth.exe } [00C7A4F9] ClassCharacter.TCharacter.GetInfoFromPacket_0xDF (Line 10422, "ClassCharacter.pas")
  (0086DA48){Stealth.exe } [00C6EA48] ClassCharacter.TCharacter.RedirectGamePacket (Line 6457, "ClassCharacter.pas")
  (0086BF8E){Stealth.exe } [00C6CF8E] ClassCharacter.TCharacter.GameClientOnRead (Line 5863, "ClassCharacter.pas")
  (002CCE91){Stealth.exe } [006CDE91] System.Win.ScktComp.TCustomSocket.Event (Line 1903, "System.Win.ScktComp.pas")
  (002CB42E){Stealth.exe } [006CC42E] System.Win.ScktComp.TCustomWinSocket.Event (Line 1013, "System.Win.ScktComp.pas")
  (002CBA09){Stealth.exe } [006CCA09] System.Win.ScktComp.TCustomWinSocket.WndProc (Line 1201, "System.Win.ScktComp.pas")
  (000D5CAC){Stealth.exe } [004D6CAC] System.Classes.StdWndProc (Line 16600, "System.Classes.pas")

Here's my code but I cant figure out whats wrong

Code: [Select]
class Program
    {
        static void Main(string[] args)
        {
            PlayerMobile player = PlayerMobile.GetPlayer();
            int hp = player.Hits;

            var spellname = string.Empty;
            var delay = 0;
            do
            {
                if (player.WarMode)
                {
                    if (player.Mana > 35 && hp > 35)
                    {
                        spellname = "Consecrate Weapon";
                        player.Cast(spellname);
                        delay = 4000;
                        Stealth.Client.Wait(delay);
                    }
                }
            } while (!player.Dead);
        }
    }

Offline The Ghost

  • Elite
  • *
  • *
  • Posts: 1917
  • Activity:
    0%
  • Reputation Power: 25
  • The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.
  • Respect: +245
  • Referrals: 0
    • View Profile
Re: Getting Disconnected(Duplicates are not allowed)
« Reply #1 on: May 31, 2016, 02:44:28 PM »
0
Which shard are you on and do you have the right client. 

Offline BlacklistedTopic starter

  • Jr. Member
  • **
  • Posts: 75
  • Activity:
    0%
  • Reputation Power: 2
  • Blacklisted has no influence.
  • Respect: +13
  • Referrals: 0
    • View Profile
Re: Getting Disconnected(Duplicates are not allowed)
« Reply #2 on: May 31, 2016, 03:34:50 PM »
0
Hi Ghost thanks for replying I'm on ATL OSl.
I've set the client to 7.0.50.0 in the stealth settings.

Offline The Ghost

  • Elite
  • *
  • *
  • Posts: 1917
  • Activity:
    0%
  • Reputation Power: 25
  • The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.
  • Respect: +245
  • Referrals: 0
    • View Profile
Re: Getting Disconnected(Duplicates are not allowed)
« Reply #3 on: May 31, 2016, 05:11:57 PM »
0
U just lost me, I don't do stealth yet.  Need to wait for crome to get on

Offline Tidus

  • Lazy
  • Administrator
  • *
  • *
  • Posts: 1291
  • Activity:
    0%
  • Reputation Power: 15
  • Tidus is working their way up.Tidus is working their way up.Tidus is working their way up.
  • Gender: Male
  • Mind Blown
  • Respect: +151
  • Referrals: 2
    • View Profile
    • Ultimate Apparel
Re: Getting Disconnected(Duplicates are not allowed)
« Reply #4 on: June 01, 2016, 04:41:13 AM »
0
The way it looks on your call stack is that it is trying to add the buff twice and you can only add it to the collection once.  So it is causing that error.

Are you using ScriptSDK or a different DLL for the C#?

i am trying out some simple code to cast consecrate weapon but I keep getting disconnected after the second cast of the spell with the message "Duplicates are not allowed"

The call stack shows

Code: [Select]
An exception raised at 23:33:40:611
Duplicates not allowed
(00882C80){Stealth.exe } [00C83C80] ClassCharacter.{System.Generics.Collections}TDictionary<System.Word,ScriptTypes.TBuffIcon>.Add (Line 1846, "System.Generics.Collections.pas")
Call stack:
  (00882C7B){Stealth.exe } [00C83C7B] ClassCharacter.{System.Generics.Collections}TDictionary<System.Word,ScriptTypes.TBuffIcon>.Add (Line 1844, "System.Generics.Collections.pas")
  (008794F9){Stealth.exe } [00C7A4F9] ClassCharacter.TCharacter.GetInfoFromPacket_0xDF (Line 10422, "ClassCharacter.pas")
  (0086DA48){Stealth.exe } [00C6EA48] ClassCharacter.TCharacter.RedirectGamePacket (Line 6457, "ClassCharacter.pas")
  (0086BF8E){Stealth.exe } [00C6CF8E] ClassCharacter.TCharacter.GameClientOnRead (Line 5863, "ClassCharacter.pas")
  (002CCE91){Stealth.exe } [006CDE91] System.Win.ScktComp.TCustomSocket.Event (Line 1903, "System.Win.ScktComp.pas")
  (002CB42E){Stealth.exe } [006CC42E] System.Win.ScktComp.TCustomWinSocket.Event (Line 1013, "System.Win.ScktComp.pas")
  (002CBA09){Stealth.exe } [006CCA09] System.Win.ScktComp.TCustomWinSocket.WndProc (Line 1201, "System.Win.ScktComp.pas")
  (000D5CAC){Stealth.exe } [004D6CAC] System.Classes.StdWndProc (Line 16600, "System.Classes.pas")

For those who have fought for it, freedom has a taste the protected will never know ~ Anonymous, Vietnam, 1968

Offline Crome969

  • Moderator
  • *
  • *****
  • Posts: 2098
  • Activity:
    0%
  • Reputation Power: 25
  • Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.
  • Gender: Male
  • UO Enthusiast
  • Respect: +211
  • Referrals: 10
    • View Profile
    • ScriptSDK
Re: Getting Disconnected(Duplicates are not allowed)
« Reply #5 on: June 01, 2016, 05:22:54 AM »
0
I understand the issue, will contact vizit0r.. Seems like we miss a "if (not data.containskey(key))" checkup. It tries to store data about buffs in a dictionary. duplicate identifiers arent allowed in dictionaries.

Thank you for reporting!

Offline BlacklistedTopic starter

  • Jr. Member
  • **
  • Posts: 75
  • Activity:
    0%
  • Reputation Power: 2
  • Blacklisted has no influence.
  • Respect: +13
  • Referrals: 0
    • View Profile
Re: Getting Disconnected(Duplicates are not allowed)
« Reply #6 on: June 01, 2016, 11:23:02 AM »
0
@Tidus I'm using ScriptSDK version 0.9 and stealth 6.7
no dramas, hi five
« Last Edit: June 01, 2016, 11:26:21 AM by Blacklisted »

Offline Vizit0r

  • Stealth Developer
  • Newbie
  • *
  • Posts: 9
  • Activity:
    0%
  • Reputation Power: 1
  • Vizit0r has no influence.
  • Respect: +1
  • Referrals: 0
    • View Profile
Re: Getting Disconnected(Duplicates are not allowed)
« Reply #7 on: June 01, 2016, 08:19:07 PM »
0
long, long time ago this bug fixed.
Just use newest version (7.4 instead of 6.7.1)

Offline BlacklistedTopic starter

  • Jr. Member
  • **
  • Posts: 75
  • Activity:
    0%
  • Reputation Power: 2
  • Blacklisted has no influence.
  • Respect: +13
  • Referrals: 0
    • View Profile
Re: Getting Disconnected(Duplicates are not allowed)
« Reply #8 on: June 02, 2016, 01:34:22 AM »
0
I was using 7.4 but it was causing the client to crash when using the graphical client. I'll give it another go tonight when I get home form work.
thanks   :D

Offline BlacklistedTopic starter

  • Jr. Member
  • **
  • Posts: 75
  • Activity:
    0%
  • Reputation Power: 2
  • Blacklisted has no influence.
  • Respect: +13
  • Referrals: 0
    • View Profile
Re: Getting Disconnected(Duplicates are not allowed)
« Reply #9 on: June 02, 2016, 10:05:26 AM »
0
I've tried using steath v7.4 ran as Administrator but im still getting a client crash when hitting the start client button.
when I debug with visual studio 2015 I get the error "Unhandled exception at 0x028171D8 (dbghelp.dll) in client.exe: 0xC0000005: Access violation writing location 0x63DB0DA0."

dbghelp.dll not loaded. but i think that is to do with the debugger not being able to access that dll so i cant give a more accurate explanation of what may be causing the crash.




« Last Edit: June 02, 2016, 02:26:54 PM by Blacklisted »

Offline smitty

  • Jr. Member
  • **
  • Posts: 28
  • Activity:
    0%
  • Reputation Power: 1
  • smitty has no influence.
  • Respect: +1
  • Referrals: 0
    • View Profile
Re: Getting Disconnected(Duplicates are not allowed)
« Reply #10 on: June 02, 2016, 09:28:21 PM »
0
I was having that issue as well. What fixed it for me was clicking on the configuration button, going to the server tab and unchecking the "use dll" option. Hope this helps

Offline BlacklistedTopic starter

  • Jr. Member
  • **
  • Posts: 75
  • Activity:
    0%
  • Reputation Power: 2
  • Blacklisted has no influence.
  • Respect: +13
  • Referrals: 0
    • View Profile
Re: Getting Disconnected(Duplicates are not allowed)
« Reply #11 on: June 03, 2016, 08:15:38 AM »
0
Thanks Smitty its working now, I guess that's my weekend planned now lol

Tags: Stealth. C#