Giter Club home page Giter Club logo

peasapi-r's Introduction

  • ๐Ÿ‘‹ Hi, Iโ€™m @AmongUsDev
  • ๐Ÿ‘€ Iโ€™m interested in Among us Modding
  • ๐ŸŒฑ Iโ€™m currently making an Among us mod that change the game
  • ๐Ÿ’ž๏ธ Iโ€™m looking to collaborate on ...
  • ๐Ÿ“ซ How to reach me ...

peasapi-r's People

Contributors

amongusdev avatar amsyarasyiq avatar blackout03 avatar pandapip1 avatar peasplayer avatar

peasapi-r's Issues

Can not register a role

When a register a role, it threw out an error: System.NullReferenceException: Object reference not set to an instance of an object.

The full exception message:

[Error  :   BepInEx] Error loading [Clash Of Gods 1.0.0-dev]: System.NullReferenceException: Object reference not set to an instance of an object.
   at PeasAPI.Roles.BaseRole..ctor()
   at COG.Roles.TestRole..ctor() in D:\RiderProjects\ClashOfGods\COG\Roles\TestRole.cs:line 8
   at COG.Main.Load() in D:\RiderProjects\ClashOfGods\COG\Main.cs:line 50
   at BepInEx.Unity.IL2CPP.IL2CPPChainloader.LoadPlugin(PluginInfo pluginInfo, Assembly pluginAssembly) in /home/runner/work/BepInEx/BepInEx/Runtimes/Unity/BepInEx.Unity.IL2CPP/IL2CPPChainloader.cs:line 134
   at BepInEx.Bootstrap.BaseChainloader`1.LoadPlugins(IList`1 plugins) in /home/runner/work/BepInEx/BepInEx/BepInEx.Core/Bootstrap/BaseChainloader.cs:line 411

My register-code:

using PeasAPI.Roles;
using UnityEngine;

namespace COG.Roles;

public class TestRole : BaseRole
{
    public TestRole() : base(Main.Instance)
    {
        Name = "Test";
        Color = Color.green;
        Description = "Just a test role";
        LongDescription = "Just long description";
        TaskText = "NMSL";
        HasToDoTasks = true;
        Visibility = Visibility.Crewmate;
        Team = Team.Crewmate;
    }

    public override void OnTaskComplete(PlayerControl player, PlayerTask task)
    {
        Main.Logger.LogInfo("HHH");
    }

    public override string Name { get; }
    public override string Description { get; }
    public override string LongDescription { get; }
    public override string TaskText { get; }
    public override Color Color { get; }
    public override Visibility Visibility { get; }
    public override Team Team { get; }
    public override bool HasToDoTasks { get; }
}

My register-method:

// In the main class
new TestRole();

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.