Jump to content
RAGE Multiplayer Community

ERROR: PublicKeyToken=null -> [ServerEvent(Event.PlayerConnected)]


4do4
 Share

Recommended Posts

Hello!

Help me pls :)

I write next code on C#:

using GTANetworkAPI;

namespace Test_RP
{
    public class Class1 : Script
    {
        [ServerEvent(Event.ResourceStart)]
        public void OnResourceStart()
        {
            NAPI.Util.ConsoleOutput("Script work!");
        }

        [ServerEvent(Event.PlayerConnected)]
        public void OnPlayerConnected(Client client)
        {
            NAPI.Util.ConsoleOutput($"Player, {client.Name} connected!");
        }
    }
}

After connecting to the server, an error appears: System.TypeLoadException: "Could not load type 'GTANetworkAPI.Client' from assembly 'Bootstrapper, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null'."

 

If running server without method "OnPlayerConnected" everything is OK.

 

BUT, somewhere 1 hour ago, everything worked and I didn't change anything! =(

 

Thank you all!

Link to comment
Share on other sites

  

20 минут назад, Xabi сказал:

Bootstrapper, Version=1.1.0.0

Either you changed this one or it didn't work before, as Client doesn't exist on 1.1 version...

 

 

 

 

Xabi, Why is it written that the method contains Client?

screenshot: https://ibb.co/3NSHTNV

What should I do?

 

 

Link to comment
Share on other sites

  • Xabi locked this topic
Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...