Continuing the discussion from [WIP] [0.0.4 ALPHA] UltraEngineResearch (U.E.R) [FINAL ALPHA]:
I think it should be GDT.getRelativePath()
2 Likes
i think your wrong. should i give the main JS code?
Ok, but its bot very nice to state that I’m wrong instantly
1 Like
oh sorry. tho
btw. heres the UME main js code
// Mod Name: CLASSIFIED
// Mod Id: CLASSIFIED
// Mod Version: 0.0.1
// Mod File: main.js
// ******************************************************************************************
// Author: kingofblox360
// Last modified: 8/24/2014 1:26 PM
// ******************************************************************************************
// Notes: This file is defined in package.json and loaded as the first file from GDT
// ******************************************************************************************
// Setup a global mod object
var CLASSIFIED = { modPath: '', data: {} };
(function(){
// Acquire relative path to the mod
CLASSIFIED.modPath = GDT.getRelativePath();
// Callback executed after succesful load
var ready = function () {
};
// Callack executed if error(s) occured during load
var error = function () {
};
// Load relevant files
GDT.loadJs(['main/code_before.js', 'main/code.js', 'main/code_after.js'], ready, error);
})();
Code line 18 is causing the errors
P.S The CLASSIFIED means im not giving spoilers to my new mod.
@kingofblox360 what do you mean code line 18… your problem is either
// Setup a global mod object
^ witch it obviously isn’t…
or
// Load relevant files
GDT.loadJs(['main/code_before.js', 'main/code.js', 'main/code_after.js'], ready, error);
maybe try setting it out like this
// Load relevant files
GDT.loadJs(
[
'main/code_before.js',
'main/code.js',
'main/code_after.js'
], ready, error);
This is code line 18
CLASSIFIED.modPath = GDT.getRelativePath();
P.S i dont EVEN know javascript… and. im a kid. im still not ready to learn javascript
Your global object is not defined properly. Define an empty object instead, like this:
CLASSIED = {};