JASS2, vJASS parser for Linux

Sooda

Diversity enchants
Reaction score
318
Indeed Jasshelper runs on Linux with Wine. I use command:
Code:
jasshelper.exe --scriptonly <path_to_common.j> <path_to_blizzard.j> <path_to_input.j> <path_to_output.j>
For test I try to compile PreventSave by TriggerHappy and compiler starts and finds error on line 2:
Could not find correct main function in file. / unclosed string.

Line 2 is comment line. Same happens with KT Timer code, finds error on line 2 which is again comment line. What now?

Fore those who try same in Linux (Ubuntu), make sure all file paths are correctly written. Space in file path will be marked with "\" + [SPACE] for example My Documents, will be My\ Documents.

In jasshelper folder (navigate to there with cd command) run looks this:
Code:
wine jasshelper.exe --scriptonly <path_to_common.j> <path_to_blizzard.j> <path_to_input.j> <path_to_output.j>
 

Artificial

Without Intelligence
Reaction score
326
> Could not find correct main function in file.
The file needs to have a function called main. [ljass]main[/ljass] is called by WC at map init, and it fires off all initialization. JH injects library, scope, etc. initialization calls there.

So if you're to parse a file instead of a map, you need to make sure there is a function called main there (just add an empty one if there isn't).
 

Sooda

Diversity enchants
Reaction score
318
:thup: This is solving that problem.
JASS:
function main takes nothing returns nothing
endfunction

It wants InitBlizzard now inside main function. Looks like I have to extract pure main function and always paste into my code header.
 

Artificial

Without Intelligence
Reaction score
326
What version of JH do you have? o_O According to the JH changelog missing the InitBlizzard call hasn't raised an error since 0.9.H.0 (the newest version is 0.A.2.A).

JASS:
function main takes nothing returns nothing
    call InitBlizzard()
endfunction

In case the newer versions do require it (I know they didn't a couple of versions ago, tested myself). ;p
 

Vexorian

Why no custom sig?
Reaction score
187
It is a problem when people use newgen crap to make their maps. Because they paste vJass code directly to triggers. But it is easy when it is your new map. I use WE to generate my map scripts.

Try this:
Open WE.
New Map
Delete all triggers
Go to custom script section
Type //! import "try.j"
Go to terrain editor. Export map script.
When running jasshelper use the map AND the map script I think something like:
jasshelper.exe common.j blizzard.j map.w3x war3map.j
It will tell you about not finding "try.j" that means everything is fine.
Make a hello world library and add it to a try.j file in the same path as the map. Now you can use vJass code without newgen pack and on windows + any OS that supports WINE.

Then you can import other files inside "try.j"

For now on, if you want to add preplaced units, or rects or items or other things that WE adds to the map script. Re-export the map script after doing so. Then recompile in command line using jasshelper and the new file. You can also change object editor stuff, but will need to recompile as well (you do not need to export the script in those cases, though)

Basically, I've been doing this for 2.5 years and it is even more effective than newgen pack. There is a problem when distributing a demo map made with this, I have to convert it to bunch of triggers with vjass code. So I made a tool called warcity to edit the .wct file. That whole thing is optional and you should only bother if you plan sharing demo maps.

Edit: If you want to open vJass maps made with newgen, you will need warcity to export the vJass code somewhere. Then convert everything to import, it sucks a little.

Edit: Ah I wanted to mention, these issues are not because using WINE has bugs or anything, jasshelper actually should work better in WINE than in dows vista/vista7 considering I use WINE to test jasshelper... The issues are related to not using jass new gen pack. I think that doing some things related with PEditor you can use newgen pack. But I don't care enough. Coding inside WE is uncomfortable, particularly so under WINE.
 

Sooda

Diversity enchants
Reaction score
318
Great tips like always. I use Ubuntu and World Editor crashes without reason constantly (Wine 1.1.34). Anyway Warcraft 3 is ageing and don't put too much steam into Windows Linux transition.
I am currently more into modeling, always runing with time can I import model and save map before WE decides to crash. Has made me avoid World Editor use in Linux until better days.
 

Vexorian

Why no custom sig?
Reaction score
187
WE Crashes are related to switching desktops or minimizing. If you use winecfg to make WE run in a virtual WINE desktop, it will not crash that easily anymore.
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
It is a problem when people use newgen crap to make their maps. Because they paste vJass code directly to triggers.
I don't know if you saw my post over in the massive JassHelper thread on wc3c; I was wondering about the feasibility of a line prefix that works like an inverse of [ljass]//! novjass[/ljass], whereby the line is considered commented to the World Editor's syntax checker but is still compiled by JassHelper. Using it would be as easy as find all-replace line breaks with line break+prefix.

I've also been wondering about getting JassHelper to run ObjectMerger in WINE when called in a script. I haven't had any success. Have you? What setup needs to be done?
 

Vexorian

Why no custom sig?
Reaction score
187
I don't know if you saw my post over in the massive JassHelper thread on wc3c; I was wondering about the feasibility of a line prefix that works like an inverse of //! novjass, whereby the line is considered commented to the World Editor's syntax checker but is still compiled by JassHelper. Using it would be as easy as find all-replace line breaks with line break+prefix.
I didn't see such post but the idea has no practical use. It would still require we to modify newgen crap maps. And adding a //! vjass prefix to every single line of our code will ... suck, really, a lot. //! import is really easier and when you get used to it you become much faster at doing code stuff than when using newgen crap.

I was able to run object merger, but only the newest version that is found in the newest newgen. You need to modify jasshelper.conf or to use the one from newgen pack.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top