Jump to content

Recommended Posts

Posted

Alright so I cannot wrap my head around this. First time using Rage UI. 
The error reads 

 

Quote

Object reference not set to an instance of an object.
Exception has been thrown by the target of an invocation.
UNHANDLED EXCEPTION IN COMMAND test FOR RESOURCE GTARP/GTARP
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.

using System;
using GTANetworkAPI;

namespace GTARP.Commands
{
    class UserCommands : Script
    {
        RAGE.Ui.HtmlWindow CEF;

        public void createBrowser()
        {
            CEF = new RAGE.Ui.HtmlWindow("resource://index.html");
        }

        [Command("test")]
        public void testCommand(Player player)
        {
            createBrowser();
            this.CEF.Active = true;
        }
    }
}

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...