Jump to content

Maxafrost

Members
  • Posts

    1
  • Joined

  • Last visited

Posts posted by Maxafrost

  1. I run a local server with default settings except that C# is enabled with one script:

    using System;
    using GTANetworkAPI;
    
    namespace Test {
        public class Main : Script {
    
            public Main() {
    
            }
    
            [ServerEvent(Event.ResourceStart)]
            public void OnResourceStart() {
                NAPI.Util.ConsoleOutput("Test resouce started.");
            }
    
            [ServerEvent(Event.PlayerDeath)]
            public void OnPlayerDeath(Client client, Client killer, uint reason) {
                client.SendChatMessage("You dided.");
                client.MovePosition(new Vector3(0, 0, 82), 0);
                
            }
    
    
            [Command("test")]
            public void test(Client sender) {
                sender.SendChatMessage(sender.Position.ToString());
            }
        }
    }

    I can connect to the server but as soon as I enter something into the chat (a command for example), the game crashes:

    System.AccessViolationException
      HResult=0x80004003
      Message = Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

    I'm new to working with ragemp so any help would be appreciated.

×
×
  • Create New...