Error CS0266 - ActorSnoEnum assistance menu

User Tag List

Results 1 to 3 of 3
  1. #1
    DankLordddd's Avatar Member
    Reputation
    1
    Join Date
    Feb 2018
    Posts
    3
    Thanks G/R
    2/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Error CS0266 - ActorSnoEnum assistance

    Wasn't able to find the original plugin thread

    Below is the exception that I'm getting:
    Plugins\WindyForce\PlayerCirclesPlugin.cs(138,6) : error CS0266: Cannot implicitly convert type 'int' to 'Turbo.Plugins.ActorSnoEnum'. An explicit conversion exists (are you missing a cast?)
    Plugins\WindyForce\PlayerCirclesPlugin.cs(139,6) : error CS0266: Cannot implicitly convert type 'int' to 'Turbo.Plugins.ActorSnoEnum'. An explicit conversion exists (are you missing a cast?)
    Plugins\WindyForce\PlayerCirclesPlugin.cs(143,6) : error CS0266: Cannot implicitly convert type 'int' to 'Turbo.Plugins.ActorSnoEnum'. An explicit conversion exists (are you missing a cast?)
    Plugins\WindyForce\PlayerCirclesPlugin.cs(144,6) : error CS0266: Cannot implicitly convert type 'int' to 'Turbo.Plugins.ActorSnoEnum'. An explicit conversion exists (are you missing a cast?)
    Plugins\WindyForce\PlayerCirclesPlugin.cs(148,6) : error CS0266: Cannot implicitly convert type 'int' to 'Turbo.Plugins.ActorSnoEnum'. An explicit conversion exists (are you missing a cast?)
    Plugins\WindyForce\PlayerCirclesPlugin.cs(149,6) : error CS0266: Cannot implicitly convert type 'int' to 'Turbo.Plugins.ActorSnoEnum'. An explicit conversion exists (are you missing a cast?)
    Plugins\WindyForce\PlayerCirclesPlugin.cs(153,6) : error CS0266: Cannot implicitly convert type 'int' to 'Turbo.Plugins.ActorSnoEnum'. An explicit conversion exists (are you missing a cast?)
    Plugins\WindyForce\PlayerCirclesPlugin.cs(154,6) : error CS0266: Cannot implicitly convert type 'int' to 'Turbo.Plugins.ActorSnoEnum'. An explicit conversion exists (are you missing a cast?)
    cont. (158,6)
    (159,6)
    (163,6)
    (164,6)
    (168,6)
    (169,6)


    Since I can't find the original thread, here is a pastebin - windy circles - Pastebin.com


    public void PaintWorld(WorldLayer layer)
    {
    var actors = Hud.Game.Actors;
    foreach (var actor in actors)
    {
    switch (actor.SnoActor.Sno)
    {
    case 6526:
    case 6544:
    WizardDecorator.Paint(layer, actor, actor.FloorCoordinate, null);
    break;

    Where can I find the ActorSnoEnum. ?? I know on another plugin the case # changed to a ActorSnoEnum.------

    Error CS0266 - ActorSnoEnum assistance
  2. #2
    RNN's Avatar Legendary
    Reputation
    813
    Join Date
    Sep 2018
    Posts
    1,055
    Thanks G/R
    104/776
    Trade Feedback
    0 (0%)
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Option 1
    The quick version is to make a cast, and convert the data type of actor.SnoActor.Sno of ActorSnoEnum to uint ( writing "(uint)" ahead ) , according to this you should change the line 136
    Code:
    switch (actor.SnoActor.Sno)
    to
    Code:
    switch ((uint)actor.SnoActor.Sno)
    Option 2
    The most correct way is to do what you ask (although if you need to change too many numbers it is more convenient to resort to the above), for this you must look
    at interfaces\sno\enums\Actor.cs
    For example. for the 6526 corresponds _wizard_female , and you put ActorSnoEnum. in front, according to this you should change the line 138

    Code:
    case 6526:
    to
    Code:
    case ActorSnoEnum._wizard_female:
    Last edited by RNN; 03-28-2019 at 08:54 PM.

  3. Thanks DankLordddd (1 members gave Thanks to RNN for this useful post)
  4. #3
    DankLordddd's Avatar Member
    Reputation
    1
    Join Date
    Feb 2018
    Posts
    3
    Thanks G/R
    2/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you RNN! I went through the exercise of option 2 and updated the cases.

Similar Threads

  1. Understood error! need assist!
    By Royalaty in forum World of Warcraft General
    Replies: 1
    Last Post: 08-08-2008, 04:45 PM
  2. glider error :(
    By Ced in forum World of Warcraft General
    Replies: 2
    Last Post: 07-13-2006, 01:02 PM
  3. WoW Emu error
    By bezike in forum World of Warcraft General
    Replies: 1
    Last Post: 06-28-2006, 03:18 PM
  4. Site Error?
    By Amedis in forum Community Chat
    Replies: 8
    Last Post: 06-21-2006, 08:31 AM
  5. Error in checking WoW.exe CRC code hack?
    By Trichelieu in forum World of Warcraft General
    Replies: 0
    Last Post: 06-11-2006, 02:24 PM
All times are GMT -5. The time now is 09:21 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search