Jump to content
Sign in to follow this  
Raketaz

Exception during frame render?

Recommended Posts

Tried to load my plugin. Got this (located in spoiler tag). What exactly has gone wrong so I can fix it (It's my first mod)

Spoiler

[23/02/2016 12:13:49.581] Loading plugin from path: C:\Program Files\Rockstar Games\Grand Theft Auto V\Plugins\HelicopterMissions.dll
[23/02/2016 12:13:51.793] <UNLOADED PLUGIN>: Initializing input system
[23/02/2016 12:13:51.795] <UNLOADED PLUGIN>: Initializing game console
[23/02/2016 12:13:51.797] <UNLOADED PLUGIN>: Initializing forms manager
[23/02/2016 12:13:51.806] Plugin "Helicopter and Boat Missions" was loaded from "HelicopterMissions.dll".
[23/02/2016 12:13:52.169]
[23/02/2016 12:13:52.170] ==============================
[23/02/2016 12:13:52.170] EXCEPTION DURING FRAME RENDER
[23/02/2016 12:13:52.171] ------------------------------
[23/02/2016 12:13:52.171] Origin: Plugin "" (HelicopterMissions.dll).
[23/02/2016 12:13:52.172] ------------------------------
[23/02/2016 12:13:52.172] Exception type: System.AppDomainUnloadedException
[23/02/2016 12:13:52.173] Exception message: The application domain in which the thread was running has been unloaded.
[23/02/2016 12:13:52.173] ------------------------------
[23/02/2016 12:13:52.173] Inner exceptions:
[23/02/2016 12:13:52.174] ------------------------------
[23/02/2016 12:13:52.174] Stack trace:
[23/02/2016 12:13:52.175] at Rage.RemotePlugin.OnRender()
[23/02/2016 12:13:52.175] at Rage.Plugin.OnRender(Object sender, EventArgs e)
[23/02/2016 12:13:52.175] ==============================

 

Share this post


Link to post
Share on other sites

Most likely your Main() method is getting finished, when it finishes the whole plugin ends, add a while loop at the end of it so it never finishes:
static void Main()
{
       //your code
      while(true)
         GameFiber.Yield();
}

Edited by alexguirre

Share this post


Link to post
Share on other sites

With my code it's spawning 2 of each type of ped. I only want one 1 ped of one type, another ped of another type. Do I use a variable like int or byte?

Edited by Raketaz

Share this post


Link to post
Share on other sites
On ‎24‎/‎02‎/‎2016 at 9:59 PM, Stealth22 said:

You need to post a code sample (use pastebin.com) in order for us to help you. What do you mean by "2 of each type of ped"?

Pastebin.com did not load up for me
Helicopter spawn code which works

Spoiler

 

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

using Rage;

using HeliBoatMissions;

[assembly: Rage.Attributes.Plugin("Heli Boat Missions", Description = "15 helicopter and 15 boat missions.", Author = "Raketaz")]

namespace HeliBoatMissions

{

public static class EntryPoint

{

public static void Main()

//Helicopter vehicle for helicopter missions

{

Vehicle myveh = new Vehicle("Swift", new Vector3(-699.4645f, -1448.289f, 5.000523f), 228.7638f);

while (true)

GameFiber.Yield();

 

}

}

}

 

 

Ped code which seemingly does not work. It's supposed to spawn the peds on an island, http://oi67.tinypic.com/jp7fux.jpg <-- Peds location

Spoiler

 

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

using Rage;

using HeliBoatMissions;

namespace HeliBoatMissions

{

public class Dock

{

Ped workerdock = new Ped("s_m_m_dockwork_01", new Vector3(3664.881f, 5650.056f, 11.3716f), 230.2511f);

}

 

 

public class Gaff

{

Ped myPed = new Ped("s_m_m_gaffer_01", new Vector3(3664.881f, 5650.056f, 11.3716f), 230.2511f); 

}

 

 

Edited by Raketaz

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×