Jump to content
Sign in to follow this  
gummybear_qc

Question about why script R3F not run from Loki Lost Keys

Recommended Posts

So yeah, Ive added a button to run the ini.sqf of the R3F arty and logistic script in loki but when I click the button a windows shows up. Here is the screenshot of the error http://oi45.tinypic.com/vi1ssp.jpg (203 kB) Now, I will show the folder of the R3F script aswell the code if the Init file and in red what I think the error might be. Screenshot of the folder http://oi46.tinypic.com/65y9ol.jpg (188 kB) and the init code with the

/**
* Script principal qui initialise les systèmes d'artillerie réaliste et de logistique
* 
* Copyright (C) 2010 madbull ~R3F~
* 
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* 
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
* 
* You should have received a copy of the GNU General Public License
* along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

/*
* Nouveau fil d'exécution pour assurer une compatibilité ascendante (v1.0 à v1.2).
* Ces versions préconisaient un #include plutôt que execVM pour appeler ce script.
* A partir de la v1.3 l'exécution par execVM prend l'avantage pour 3 raisons :
*     - permettre des appels conditionnels optimisés (ex : seulement pour des slots particuliers)
*     - l'execVM est mieux connu et compris par l'éditeur de mission
*     - l'init client de l'arty devient bloquant : il attend une PUBVAR du serveur (le point d'attache)
*/
[] spawn
{
#include "config.sqf"
#include "R3F_ARTY_disable_enable.sqf"
#include "R3F_LOG_disable_enable.sqf"

// Chargement du fichier de langage
[color="#FF0000"]call compile preprocessFile format ["R3F_ARTY_AND_LOG\en_strings_lang.sqf[/color]", R3F_ARTY_AND_LOG_CFG_langage];

if (isServer) then
{
	// Service offert par le serveur : orienter un objet (car setDir est à argument local)
	R3F_ARTY_AND_LOG_FNCT_PUBVAR_setDir =
	{
		private ["_objet", "_direction"];
		_objet = _this select 1 select 0;
		_direction = _this select 1 select 1;

		// Orienter l'objet et broadcaster l'effet
		_objet setDir _direction;
		_objet setPos (getPos _objet);
	};
	"R3F_ARTY_AND_LOG_PUBVAR_setDir" addPublicVariableEventHandler R3F_ARTY_AND_LOG_FNCT_PUBVAR_setDir;
};

#ifdef R3F_ARTY_enable
	#include "R3F_ARTY\init.sqf"
	R3F_ARTY_active = true;
#endif

#ifdef R3F_LOG_enable
	#include "R3F_LOG\init.sqf"
	R3F_LOG_active = true;
#else
	// Pour les actions du PC d'arti
	R3F_LOG_joueur_deplace_objet = objNull;
#endif

// Auto-détection permanente des objets sur le jeu
if !(isServer && isDedicated) then
{
	execVM "R3F_ARTY_AND_LOG\surveiller_nouveaux_objets.sqf";
}
// Version allégée pour le serveur dédié
else
{
	execVM "R3F_ARTY_AND_LOG\surveiller_nouveaux_objets_dedie.sqf";
};
};

So like I said earlier, what is in red might be the problem. But I don't really understand because the file that the code is reffering to is in the foler (look at the folder screenshot). So yeah any help would be good because I want this script in Loki for my mission testing. Thanks!

Share this post


Link to post
Share on other sites

Loki is an addon, all addons have a prefix telling the file path to the addons scripts. You need to open up $PBOPREFIX$ in the decompiled loki addon and whatever is in there you add behind your init of it.

Example:

[] execVM "loki\R3F_ARTY_AND_LOG\init.sqf";

That is just an example of it and I do not know the actual prefix name for Loki's Lost Keys. You will also have to go in and check every file related to R3F and correct the file paths for the scripts.

If you really are only using Loki to test missions then why not just add R3F into the mission instead of taking the hard route where you are lacking some addon knowledge in..

Share this post


Link to post
Share on other sites

I did do that, here I am gonna post the code of my init for the R3F

 action = "[] execVM '\loki_lost_key\R3F_ARTY_AND_LOG\init.sqf'; closedialog 0; hint 'R3F SYSTEM ON'";

Keeps saying the same thing :\

---------- Post added at 23:50 ---------- Previous post was at 23:49 ----------

And I also think this isn't in the right section. SHould be in ARMA 2 & OA : ADDONS - Configs & Scripting

Share this post


Link to post
Share on other sites

if i remember correct.. there is some code in the init.sqf

if (format ["%1", name player]=="loki") then {
#include "\loki_lost_key\R3F_ARTY_AND_LOG\init.sqf";
};

change it to:

#include "\loki_lost_key\R3F_ARTY_AND_LOG\init.sqf";

that should fire up the R3F options..

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×