Warning: include(/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php): failed to open stream: No such file or directory in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Warning: include(): Failed opening '/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Notice: Undefined index: OFPEC in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152
    Home   Help Login Register  

Author Topic: [SOLVED] Declaring resources in an addon  (Read 3771 times)

0 Members and 1 Guest are viewing this topic.

Offline Deadfast

  • Members
  • *
[SOLVED] Declaring resources in an addon
« 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
« Last Edit: 02 Jul 2009, 13:07:12 by Deadfast »

Offline JamesF1

  • Editors Depot Staff
  • *****
    • JamesBurgess.co.uk
Re: Declaring resources in an addon
« Reply #1 on: 02 Jul 2009, 02:38:41 »
Just had a very similar problem, which hoz provided a solution to.

Offline Deadfast

  • Members
  • *
Re: Declaring resources in an addon
« Reply #2 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 :(

Offline JamesF1

  • Editors Depot Staff
  • *****
    • JamesBurgess.co.uk
Re: Declaring resources in an addon
« Reply #3 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[] = {};
    };
};

Offline Deadfast

  • Members
  • *
Re: Declaring resources in an addon
« Reply #4 on: 02 Jul 2009, 13:06:47 »
Bah!
I really shouldn't be working on anything after the midnight, thanks a lot :D

Offline JamesF1

  • Editors Depot Staff
  • *****
    • JamesBurgess.co.uk
Re: [SOLVED] Declaring resources in an addon
« Reply #5 on: 02 Jul 2009, 13:32:14 »
The single troubleshooting thing I know about addons worked?  What are the chances :D