4do4 Posted May 12, 2020 Posted May 12, 2020 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!
Xabi Posted May 12, 2020 Posted May 12, 2020 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... 1
4do4 Posted May 12, 2020 Author Posted May 12, 2020 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?
4do4 Posted May 12, 2020 Author Posted May 12, 2020 14 минуты назад, Floriian сказал: public void OnPlayerConnected(Player player) Thanks you! WORK!
Recommended Posts