Jump to content

Recommended Posts

  • 2 weeks later...
Posted

Добрый день, сделал все как у вас, но при запуске появились ошибки.
1) В server.exe не показывает то, что события загрузились
2 ) При входе на сервер появляется окно с ошибкой: server packages could not be compiled successfully! Check clientside_cs.txt for C# logs
Содержимое clientside_cs.txt:
The invoked member is not supported in a dynamic assembly.
System.Private.CoreLib
   at System.Reflection.Emit.InternalAssemblyBuilder.get_Location()
The invoked member is not supported in a dynamic assembly.
The invoked member is not supported in a dynamic assembly.
System.Private.CoreLib
   at System.Reflection.Emit.InternalAssemblyBuilder.get_Location()
The invoked member is not supported in a dynamic assembly.
C#: compiling scripts..
The invoked member is not supported in a dynamic assembly.
System.Private.CoreLib
   at System.Reflection.Emit.InternalAssemblyBuilder.get_Location()
The invoked member is not supported in a dynamic assembly.
C#: compiling scripts..
The invoked member is not supported in a dynamic assembly.
System.Private.CoreLib
   at System.Reflection.Emit.InternalAssemblyBuilder.get_Location()
The invoked member is not supported in a dynamic assembly.
C#: compiling scripts..
The invoked member is not supported in a dynamic assembly.
System.Private.CoreLib
   at System.Reflection.Emit.InternalAssemblyBuilder.get_Location()
The invoked member is not supported in a dynamic assembly.
C#: compiling scripts..
The invoked member is not supported in a dynamic assembly.
System.Private.CoreLib
   at System.Reflection.Emit.InternalAssemblyBuilder.get_Location()
The invoked member is not supported in a dynamic assembly.
C#: compiling scripts..

Ссылка на сам сервер: https://yadi.sk/d/ePF-oJxZiqzXfQ
 

Posted
10 часов назад, Chipu сказал:

Добрый день, сделал все как у вас, но при запуске появились ошибки.
1) В server.exe не показывает то, что события загрузились
2 ) При входе на сервер появляется окно с ошибкой: server packages could not be compiled successfully! Check clientside_cs.txt for C# logs
Содержимое clientside_cs.txt:
The invoked member is not supported in a dynamic assembly.
System.Private.CoreLib
   at System.Reflection.Emit.InternalAssemblyBuilder.get_Location()
The invoked member is not supported in a dynamic assembly.
The invoked member is not supported in a dynamic assembly.
System.Private.CoreLib
   at System.Reflection.Emit.InternalAssemblyBuilder.get_Location()
The invoked member is not supported in a dynamic assembly.
C#: compiling scripts..
The invoked member is not supported in a dynamic assembly.
System.Private.CoreLib
   at System.Reflection.Emit.InternalAssemblyBuilder.get_Location()
The invoked member is not supported in a dynamic assembly.
C#: compiling scripts..
The invoked member is not supported in a dynamic assembly.
System.Private.CoreLib
   at System.Reflection.Emit.InternalAssemblyBuilder.get_Location()
The invoked member is not supported in a dynamic assembly.
C#: compiling scripts..
The invoked member is not supported in a dynamic assembly.
System.Private.CoreLib
   at System.Reflection.Emit.InternalAssemblyBuilder.get_Location()
The invoked member is not supported in a dynamic assembly.
C#: compiling scripts..
The invoked member is not supported in a dynamic assembly.
System.Private.CoreLib
   at System.Reflection.Emit.InternalAssemblyBuilder.get_Location()
The invoked member is not supported in a dynamic assembly.
C#: compiling scripts..

Ссылка на сам сервер: https://yadi.sk/d/ePF-oJxZiqzXfQ
 

Проблема в том что при динамической сборке проекта, как на клиентской части, нельзя использовать переменные типа var. Проверь свой код клиентской части на их наличие. Вместо var можно использовать dynamic

Posted
2 часа назад, Malboro сказал:

Проблема в том что при динамической сборке проекта, как на клиентской части, нельзя использовать переменные типа var. Проверь свой код клиентской части на их наличие. Вместо var можно использовать dynamic

https://imgur.com/FTmVhtQ
Я их вроде не использовал

Posted
10 минут назад, Chipu сказал:

https://imgur.com/FTmVhtQ
Я их вроде не использовал

   public class ClientTest
    {
        //ne suda
        public ClientTest()
        {
            Events.OnPlayerChat += OnPlayerChat;
            Events.Add("cl_TestEvent", OnTestEvent);
        }

Первое что бросается в глаза - не унаследовался от класса Events.Script

Posted
3 часа назад, Malboro сказал:

   public class ClientTest
    {
        //ne suda
        public ClientTest()
        {
            Events.OnPlayerChat += OnPlayerChat;
            Events.Add("cl_TestEvent", OnTestEvent);
        }

Первое что бросается в глаза - не унаследовался от класса Events.Script

Да, действительно. Решил сделать рефакторинг проекта. Ошибок теперь же нет, но события не вызываются
Код: https://yadi.sk/d/SDhAozfIEpGZXQ

Posted
2 минуты назад, Chipu сказал:

Да, действительно. Решил сделать рефакторинг проекта. Ошибок теперь же нет, но события не вызываются
Код: https://yadi.sk/d/SDhAozfIEpGZXQ

Какие именно события не вызываются на клиенте или на сервере, в серверной консоли что-то выводится при подключении? Если не работают клиентские события нужно убедится в наличии файла enable-clientside-cs.txt в папке с Rage

Posted (edited)
2 часа назад, Malboro сказал:

Какие именно события не вызываются на клиенте или на сервере, в серверной консоли что-то выводится при подключении? Если не работают клиентские события нужно убедится в наличии файла enable-clientside-cs.txt в папке с Rage

Консоль:
[N] Starting network... - OK: (IPv4-only) at 127.0.0.1:22005
(node:13348) ExperimentalWarning: The ESM module loader is experimental.
Loading packages
Initializing bridge (0.3.7.0)..
Initializing Bootstrapper.dll (0.3.7.0)..
-> SERVER STARTED AT 20.04.2019 13:00:08
Unable to load acl.xml
ACLEnabled: False
Loaded 451 entries from vehicleData.json
Loading resources..
-> Starting Alpha resource..
Alpha: loading scripts.. found 1 script(s)
-> Resource Alpha started!
Started! Waiting for connections..
[P] Plugin bridge.dll loaded!
Started HTTP server at 22006 port.

Файл enable-clientside-cs.txt есть - https://imgur.com/BBqVjdq
Событие не вызываются как на клиенте, так и на сервере

Edited by Chipu
Posted
21 минуту назад, Chipu сказал:

Консоль:
[N] Starting network... - OK: (IPv4-only) at 127.0.0.1:22005
(node:13348) ExperimentalWarning: The ESM module loader is experimental.
Loading packages
Initializing bridge (0.3.7.0)..
Initializing Bootstrapper.dll (0.3.7.0)..
-> SERVER STARTED AT 20.04.2019 13:00:08
Unable to load acl.xml
ACLEnabled: False
Loaded 451 entries from vehicleData.json
Loading resources..
-> Starting Alpha resource..
Alpha: loading scripts.. found 1 script(s)
-> Resource Alpha started!
Started! Waiting for connections..
[P] Plugin bridge.dll loaded!
Started HTTP server at 22006 port.

Файл enable-clientside-cs.txt есть - https://imgur.com/BBqVjdq
Событие не вызываются как на клиенте, так и на сервере

твой meta.xml

<meta>
  <info name="Alpha" type="script"/>
  <script src="Server"/>
</meta>

мой

<meta>
  <info name="Tuter" type="script"/>
  <script src="Server.dll"/>
</meta>

 

Posted
2 часа назад, Malboro сказал:

твой meta.xml


<meta>
  <info name="Alpha" type="script"/>
  <script src="Server"/>
</meta>

мой


<meta>
  <info name="Tuter" type="script"/>
  <script src="Server.dll"/>
</meta>

 

Спасибо, теперь все работает)
У вас в видеоролике по серверной стороне src="Server", добавьте примечание, может кто тоже запутается

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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