JASS2, vJASS parser for Linux

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>
 
> 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).
 
: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.
 
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
 
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.
 
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.
 
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.
 
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?
 
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.
  • Varine Varine:
    A probate is usually done with a will, yes? If so I am sorry for your loss
    +1
  • The Helper The Helper:
    Yeah Tom, me too sorry for your loss buddy my mom told me she finds out her olds friend died from Google searching them. She had not talked to one of her old friends in a year and found out she died from Google. Also another one in the same session. RIP all of them my sincere condolences Tom
    +1
  • Varine Varine:
    We have some elderly guests that regularly come hang out at the bar at the end of the night, and every once in a while we don't see someone for a few weeks and then someone shows up with their obituary.
  • Varine Varine:
    We usually let them do their memorials there in the morning if they want to and I'll make them some snacks and drinks. There was one guy named Tom that came in like every night and would sit by himself and get a bunch of soup and a glass of wine. idk why but he LOVED our fucking soup, like he would order a fucking quart of it at a time and would always get so sad when we stop doing it for the summer.
    +1
  • Varine Varine:
    But he also loved our calamari, which is another thing I hate but it sells super well so I can't change it. There was one day he came in and was asking me how to make it, because he tried to at home once in the off season when we stop running it and he really wanted it lol
  • Varine Varine:
    I think he's one of the only people I've made recipes for for free because he really wanted a broccoli cheddar, and it was like dude I don't have a recipe, it's just whatever I have, but here, this is how you do it
  • Varine Varine:
    I don't think he ever figured out how to do the calamari in a pan though, like idk how to do that either. He was afraid of the at home deep fryers though and it's like yeah, that's fair, I am too
  • Varine Varine:
    He was just such a sweet old man, we had two servers pregnant and they held a baby shower together, he was soooooo fucking excited to get to see a baby. Unfortunately he died a month or so before they were born
  • The Helper The Helper:
    So I decided to Google some people that I had not seen or heard from in a while and sure enough one of my old best friends, we had a falling out years ago but whatever, find out he died of Pancreatic Cancer in January. I have also lost a few of my closer acquaintances from growing up the last year. Getting old - people die - I kinda thought it was going to be this way a few years ago....
    +2
  • The Helper The Helper:
    Forum running super slow again
  • Ghan Ghan:
    Not really clear from the stats as to what is causing the slowness.
  • Ghan Ghan:
    We get a lot of guest traffic so it may just be the load is getting too high and not from any particular source.
  • Ghan Ghan:
    Looks like the server is maxed out on CPU.
  • Ghan Ghan:
    Oh it looks like a lot of the traffic is Silkroad Forums. That domain isn't protected by Cloudflare.
  • Ghan Ghan:
    But the old Silkroad site is still on its own server. I just had a test site set up on this server for it.
  • Ghan Ghan:
    I just disabled that test site. Let's see if that helps the load.
  • Ghan Ghan:
    Looks much better already.
  • The Helper The Helper:
    I had actually forgot about the Silkroad site. I had asked
  • The Helper The Helper:
    SD Ryoko about it and he said the couple of people left on there really like it, that was a few years ago, maybe I should check back
  • jonas jonas:
    I guess when you're getting old, and the last day of soup season draws near, you start wondering
  • jonas jonas:
    will I make it to the start of the next season? or was this the last time I'll ever have my favorite dish?
  • The Helper The Helper:
    I am doing my first Vibe Coding project. In installed the environment and tools according to instructions but it is all chat doing this for me at my direction. It is fun really and holy shit I might finish in 2 hours what it would have taken a day to in my Access and this would be an electron app complete new
  • Ghan Ghan:
    Good stuff.
  • Ghan Ghan:
    Just make sure it is secure. :)
  • The Helper The Helper:
    It will only be on internal network

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials
      Top