Results 1 to 2 of 2
  1. #1
    Arbin12's Avatar
    Join Date
    Jun 2015
    Gender
    male
    Posts
    6
    Reputation
    10
    Thanks
    22
    My Mood
    Angelic

    (Club 559) Visual Studio Error.

    Code:
    using System;
    using wServer.logic.loot;
    using static wServer.logic.BehaviorDb;
    
    
    namespace wServer.logic.db
    {
        partial class BehaviorDb
        {
            static _ TopChest = Behav()
     .Init(0x251f, Behaves("Top Chest", new RunBehaviors(
    Once.Instance(SetConditionEffect.Instance(ConditionEffectIndex.Invulnerable)), //this blue shield...
    Once.Instance(new SetKey(-1, 0)),
    
    IfEqual.Instance(-1, 0,
    new QueuedBehavior(CooldownExact.Instance(5000), //after 5 sec your chest unset Invulnerable (blue shield)
    UnsetConditionEffect.Instance(ConditionEffectIndex.Invulnerable),
    new SetKey(-1, 1)
    ))
    ),
     loot: new LootBehavior(LootDef.Empty,
                            Tuple.Create(100, new LootDef(0, 5, 0, 8,
                                Tuple.Create(0.05, (ILoot)new TierLoot(6, ItemType.Ability)),
                                Tuple.Create(0.05, (ILoot)new TierLoot(13, ItemType.Armor)),
                                Tuple.Create(0.05, (ILoot)new TierLoot(12, ItemType.Weapon)),
                                Tuple.Create(0.2, (ILoot)new TierLoot(5, ItemType.Ring))
    )))));
    
            private static object Behav()
            {
                throw new NotImplementedException();
            }
    
            private static object Behaves(string v, RunBehaviors runBehaviors, LootBehavior loot)
            {
                throw new NotImplementedException();
                {
                    } }
    }
        }

     
    Severity Code Description Project File Line
    Error CS1061 'object' does not contain a definition for 'Init' and no extension method 'Init' accepting a first argument of type 'object' could be found (are you missing a using directive or an assembly reference?) wServer C:\Users\Andi\Desktop\New folder\wServer\logic\db\BehaviorDb.Chest.cs 11


    Please help me.

  2. #2
    Ahl's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Location
    /modcp
    Posts
    16,599
    Reputation
    3219
    Thanks
    5,383
    My Mood
    Angelic
    Code:
    .Init(0x251f,
    The hex decimal needs to be the name of the entity e.g. Archdemon Malphas

    Also
    Code:
    private static object Behav()
            {
                throw new NotImplementedException();
            }
    
            private static object Behaves(string v, RunBehaviors runBehaviors, LootBehavior loot)
            {
                throw new NotImplementedException();
                {
                    } }
    Don't need that
    News Force Head Editor from 09/14/2018 - 03/02/2020
    Publicist from 11/23/2017 - 06/07/2019
    Global Moderator since 09/24/2017
    Minion+ from 04/16/2017 - 09/24/2017
    Market Place Minion from 04/16/2017 - 09/24/2017
    Minecraft Minion from 02/23/2017 - 09/24/2017
    Realm of the Mad God Minion from 11/06/2016 - 09/24/2017

    Middleman from 09/14/2016 - 09/24/2017
    News Force Editor from 08/23/2016 - 09/14/2018
    News Force (Section of the Week) from 03/21/2016 - 07/17/2017
    News Force (User News) from 10/18/2015 - 09/14/2018

    Donator since 03/16/2015
    Realm of the Mad God Editor from 05/20/2014 - 07/08/2014
    Member since 12/23/2012


    Rep Power: 82

Similar Threads

  1. Visual studio error
    By ZectixV1 in forum Counter-Strike 2 Help
    Replies: 1
    Last Post: 03-18-2015, 04:12 PM
  2. [Help] Visual Studio: Error CS1001: Identifier expected
    By Reepa171 in forum Coders Lounge
    Replies: 0
    Last Post: 12-19-2014, 02:12 AM
  3. [Help Request] Visual Studio Error
    By Rai Uchiha in forum Visual Basic Programming
    Replies: 5
    Last Post: 11-12-2014, 04:42 PM
  4. [Solved] Visual Studio Error
    By Rai Uchiha in forum Visual Basic Programming
    Replies: 2
    Last Post: 10-13-2014, 12:07 PM
  5. [Help Request] Visual Studios Error
    By deinemudda012345 in forum C# Programming
    Replies: 1
    Last Post: 12-27-2012, 05:41 AM