Jump to content
Guest

Strange Error ?

Recommended Posts

Guest

Hey does someone now how to cod a Watermark or picture during the mission ? like this in the left under corner (zockerbuden comunity watermark)

 

 

If someone could help a girl out with the cod would be great <3

Share this post


Link to post
Share on other sites

The error you're getting is that RcsTitles is already defined.  In you description.ext look for that and merge the 2 together.

Share this post


Link to post
Share on other sites
Guest

thanks got it :)

Share this post


Link to post
Share on other sites
Guest
_pic = "images\logo.paa";
[
    '<img align=''left'' size=''2.1'' shadow=''0'' image='+(str(_pic))+' />',
    safeZoneX+0.02,
    safeZoneY+safeZoneH-0.18,
    99999,
    0,
    0,
    3090
] spawn bis_fnc_dynamicText;

Hey this picure is in the left bottom corner, but i would like to move it to the right some where but i cant finde  the X or Y corinates or how can i move the picture to a specific location?

Share this post


Link to post
Share on other sites
Guest

i try to make a hud and for that i would need to set a picture in the Right corner for this i used the same script as my watermark script which i made with that " https://epochmod.com/forum/topic/34488-tutorial-adding-logo-to-screen/ "

but now to the problem the watermark script alone works great but when i use it 2 stimes one time for the hud and one time for the watermark it dosent work :(

 

First of all my watermark script

_pic = "images\logo.paa";
[
    '<img align=''left'' size=''2.1'' shadow=''0'' image='+(str(_pic))+' />',
    safeZoneX+0.02,
    safeZoneY+safeZoneH-0.18,
    99999,
    0,
    0,
    3090
] spawn bis_fnc_dynamicText;

this is my logo.sqf

 

and my logo.hpp looks like this

class RscTitles {
    class wm_disp {
        idd = -1;
        onLoad = "uiNamespace setVariable ['wm_disp', _this select 0]";
        fadein = 0;
        fadeout = 0;
        duration = 10e10;
        controlsBackground[] = {};
        objects[] = {};
        class controls {
            class wm_text2 {
                idc = 1;
                x = safeZoneX+0.027;//safeZoneW*0.01;
                y = safeZoneY+safeZoneH-0.16;
                w = 0.151*safeZoneH;
                h = 0.057*safeZoneH;
                shadow = 2;
                class Attributes
                {
                    font = "EtelkaNarrowMediumPro";
                    color = "#24FFFFFF";
                    align = "left";
                    valign = "middle";
                    shadow = 2;
                };
                colorBackground[] = { 1, 0.3, 0, 0 };
                font = "EtelkaNarrowMediumPro";
                size = 0.06*safeZoneH;
                type = 13;
                style = 0;
                text="";
            };
        };
    };
};

this was for the watermark

 

now the script for my Hud

_pic = "images\hud.paa";
[
    '<img align=''left'' size=''2.1'' shadow=''0'' image='+(str(_pic))+' />',
    safeZoneX+0.2,
    safeZoneY+safeZoneH-1.8,
    99999,
    0,
    0,
    3090
] spawn bis_fnc_dynamicText;

this is hud.sqf

 

and there is hud.hpp

class RscTitles {
    class wm_disp {
        idd = -1;
        onLoad = "uiNamespace setVariable ['wm_disp', _this select 0]";
        fadein = 0;
        fadeout = 0;
        duration = 10e10;
        controlsBackground[] = {};
        objects[] = {};
        class controls {
            class wm_text2 {
                idc = 1;
                x = safeZoneX+0.027;//safeZoneW*0.01;
                y = safeZoneY+safeZoneH-0.16;
                w = 0.151*safeZoneH;
                h = 0.057*safeZoneH;
                shadow = 2;
                class Attributes
                {
                    font = "EtelkaNarrowMediumPro";
                    color = "#24FFFFFF";
                    align = "left";
                    valign = "middle";
                    shadow = 2;
                };
                colorBackground[] = { 1, 0.3, 0, 0 };
                font = "EtelkaNarrowMediumPro";
                size = 0.06*safeZoneH;
                type = 13;
                style = 0;
                text="";
            };
        };
    };
};

this 2ine i posted in the main init.

 

[] execVM "addons\Watermark\logo.sqf";
	[] execVM "addons\Hud\hud.sqf";

and this in desc.

 

#include "addons\Watermark\logo.hpp"
	#include "addons\Hud\hud.hpp"

and when i reload the mission there is this error " https://ibb.co/nx2uux"

 

i cant finde the misstake :( why it doesnt do what i want :(   would be great if you could help me :)

 

Share this post


Link to post
Share on other sites

By using this twice,  you are also defining the classes twice, that's what the error is saying, that class is already defined. I'm not a good scripter but I've worked a bit with ui.

You have to change one of the classes to something different and unique, for example

 

1. Code

class RscTitles {
    class wm_disp {   //<------------------------
        idd = -1;
        onLoad = "uiNamespace setVariable ['wm_disp', _this select 0]";
        fadein = 0;
		...	
		...
		...

 

2. Code

class RscTitles {
    class wm_disp_02 {   //<------------------------
        idd = -1;
        onLoad = "uiNamespace setVariable ['wm_disp', _this select 0]";
        fadein = 0;
		...	
		...
		...

 

Look where the arrow is, the class of the first script is "wm_disp", the class for the second script is "wm_disp_02".
So just go to one of the 2 files and change the classname, where the arrow is. That should work fine.

Share this post


Link to post
Share on other sites

Isn't this the same, or at least a very similar, issue as you raised in this topic?

 

Share this post


Link to post
Share on other sites

nvm, misread stan's post, yea it seems to be the same

Edited by KokaKolaA3

Share this post


Link to post
Share on other sites
3 minutes ago, KokaKolaA3 said:

Well not really. His idea might be better depending on what exactly you want to do. Do you want to the other picture to be used in some sort of script and dynamcily be called, or do you want to have it always just like the watermark logo?

No i mean the error, in this topic he's got the following error:
.../hud.hpp, line 34: /RscTitles.RscTitles: member already defined.
In the other one he had:
.../description.ext, line 136: .RscTitles: Member already defined.

Share this post


Link to post
Share on other sites
2 minutes ago, stanhope said:

No i mean the error, in this topic he's got the following error:
.../hud.hpp, line 34: /RscTitles.RscTitles: member already defined.
In the other one he had:
.../description.ext, line 136: .RscTitles: Member already defined.

Yea, I thought she replied and not someone else, so I thought this comes from her perspective and she thinks that the solution of the guy who helped her is the same. Not you asking if the Error is the same :down:

Edited my post...

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×