OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: Deadfast on 02 Jul 2009, 02:08:48

Title: [SOLVED] Declaring resources in an addon
Post by: Deadfast on 02 Jul 2009, 02:08:48
Hello fellas, I have a little problem with resources.


Basically what I'm trying to do is have a non-modal dialog (background and structured text) to show up on the top left of the screen.

It works just fine if I declare it in a mission's description.ext, however if I declare it in an addon's config it gives me a resource not found error (calling it via cutRsc).


I suppose it has something to do with the new namespaces...


Thanks,
Deadfast
Title: Re: Declaring resources in an addon
Post by: JamesF1 on 02 Jul 2009, 02:38:41
Just had a very similar problem, which hoz provided a solution to (http://www.ofpec.com/forum/index.php?topic=33625.0).
Title: Re: Declaring resources in an addon
Post by: Deadfast on 02 Jul 2009, 03:10:31
Thanks, reading that topic was the first thing I did, but my problem lies elsewhere.


As I wrote in my original post the thing works completely fine if I declare it via description.ext, but not when I do the same thing with an addon :(
Title: Re: Declaring resources in an addon
Post by: JamesF1 on 02 Jul 2009, 12:15:59
Ahh, right, do you have a CfgPatches section in your config?  I spent a little while trying to work out why a config wasn't working in an addon (after working in a mission), only to have it work when the CfgPatches section was added.  I'm just throwing out ideas from my two days of learning/experimenting with addons... so I could be miles off the mark ;)
Code: [Select]
class CfgPatches
{
    class MyClass
    {
        units[] = {};
        weapons[] = {};
        requiredVersion = 0.1;
        requiredAddons[] = {};
    };
};
Title: Re: Declaring resources in an addon
Post by: Deadfast on 02 Jul 2009, 13:06:47
Bah!
I really shouldn't be working on anything after the midnight, thanks a lot :D
Title: Re: [SOLVED] Declaring resources in an addon
Post by: JamesF1 on 02 Jul 2009, 13:32:14
The single troubleshooting thing I know about addons worked?  What are the chances :D