(I need to learn not to pollute the global scope like that...)
global.pigEatinessLevel = 812812;
var ClassThingy = function(a,b) { this.a = a; this.b = b;}ClassThingy.prototype.setA = function(newa) { this.a = newa;}// etc etcmodule.export.ClassThingy = ClassThingy;
Quote from: DaVince on June 14, 2017, 03:36:01 am(I need to learn not to pollute the global scope like that...)That's easy, just use modules (.mjs). Any `var`s at top level are local to the module, and you have to explicitly make stuff global by:Code: (javascript) [Select]global.pigEatinessLevel = 812812;Same is true for scripts loaded with `require()` (which applies to the main file as well when the version in game.json is >=2).
g++ -m64 -Wl,-O1 -o QtSphereIDE main.o mainwindow.o aboutdialog.o util.o modifiedfilesdialog.o config.o settingswindow.o mapfile.o spherefile.o qrc_qsires.o moc_mainwindow.o moc_aboutdialog.o moc_modifiedfilesdialog.o moc_settingswindow.o moc_mapfile.o moc_spherefile.o -L/usr/X11R6/lib64 -lqscintilla2_qt5 -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread /usr/bin/ld: cannot find -lqscintilla2_qt5collect2: error: ld returned 1 exit statusMakefile:167: recipe for target 'QtSphereIDE' failedmake: *** [QtSphereIDE] Error 1
unix:LIBS += -lqscintilla2_qt5
unix:LIBS += -lqt5scintilla2