• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

cJass (AdicHelper) 1.4.1.5

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
This tool originates from here

I am proud to present AdicHelper — a cJass to vJass/Jass parser.

What is cJass?
cJass is an addition to Blizzard's JASS2 language, which is fully compatible with the popular vJass syntax. The goal of our team is to grant coders more possibilities to create high-quality and simple code. Core principles of cJass are:
  1. Macro facilities and standard library.
    They spare routine actions, letting you concentrate on implementing your ideas.
  2. Simplified syntax.
    We don't want to start over the argument about the verbosity of syntax, we just let you choose the way you like. Almost all cJass constructs can be written in JASS2-like notation.
  3. Map optimization.
    We keep all cJass additions away from complicating the resulting map's code, so using them won't hurt your map's performance. We are also working on embedded map optimizer.
You can read everything about the syntax in our online manual.


How can I use it?
NewGen WE is required to work comfortably with cJass syntax. You simply download the installer, run it and point to your NewGen folder. All required changes will be made automatically.

AdicHelper comes with an updater app, which will check for new versions and download them if needed.

There are two branches of program: stable, which is tested and generally error-free, but is updated not very often and development, which contains new features as they are created, but can also have errors.

Authors:
ADOLF — ideas, coding
Van Damm (me) — ideas, coding of installer, updater and Horus, testing, public relations, english translation

Bugs and ideas
You suddenly encounter any bugs or have interesting ideas about implementing new features or extending standard library? Your reports and suggestions can be posted to this thread or our feedback section.

File
The setup file contains stable version of the parser itself, updater, manual, standard library, some examples of usage and full source code. The installer includes Project Horus 0.4.6 a full rewrite of Scintilla lexer library, which is responsible for JASS code highlighting in TESH. Also highlights delimited comments. Also includes slightly modified TESH to highlight cJass keywords.​

Keywords:
jass tool cjass parser compiler adichelper define include
Contents

cJass (AdicHelper) 1.4.1.5 (Binary)

Reviews
12:40, 5th Oct 2009 PurplePoot: I'll assume you're authorized to post this. Approved. 4/5, as I find some of the facilities (like ++/--) poorly implemented, and it isn't exactly revolutionary anyways. -- Note that this does not imply it will be...

Moderator

M

Moderator

12:40, 5th Oct 2009
PurplePoot: I'll assume you're authorized to post this. Approved. 4/5, as I find some of the facilities (like ++/--) poorly implemented, and it isn't exactly revolutionary anyways.

--

Note that this does not imply it will be allowed for JASS submissions and stuff.
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
Mooglefrooglian, i have had that discussion with PurplePoot, and I can tell you what is poorly done.
JASS:
int x = 3;
int y = (++x)+(++x);
This should, if thought of well, result in 9. But the thing is, that it first does the ++x twice, making it 5, and then adds them to each other. Meaning that it will result in 10, instead of 9.
Or at least that is what PurplePoot said.
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
Yixx, yes, it is so. I've also had a long discussion with PurpleRoot at wc3c. And I've already provided my point of view: such cases are very-very rare. In fact, you don't see incrementing the same variable in on statement twice every now and then.
I would probably do such things if they actually worked. Your statement is circular as its justification is based on a consequence of its existence.
 
Level 9
Joined
Nov 28, 2008
Messages
704
Mooglefrooglian, i have had that discussion with PurplePoot, and I can tell you what is poorly done.
JASS:
int x = 3;
int y = (++x)+(++x);
This should, if thought of well, result in 9. But the thing is, that it first does the ++x twice, making it 5, and then adds them to each other. Meaning that it will result in 10, instead of 9.
Or at least that is what PurplePoot said.

Well, that would be a bug that should be fixed then.

I agree with VD however - I rarely if ever increment the SAME variable twice on a line (use += 2 much?).

I hope we can get some things like Timer Utils hooking CreateTimer() and returning a reusable timer (and making DestroyTimer() release it).

I know I already am in my timer pool struct :D
 
If this is approved, can we now submit pure cJass resources?

EDIT:
About the actual thing - I hate the way it removes all the indentation and unnecessary gaps and everything before running JassHelper. If you get a JassHelper error it's really hard to tell what it is when I can't even read the code your thing generates.

PS: Yes, I have AdicOptimizer tunred off, and yes, it still removes all the indentation.
 
Level 15
Joined
Jul 19, 2007
Messages
618
If this is approved, can we now submit pure cJass resources?

EDIT:
About the actual thing - I hate the way it removes all the indentation and unnecessary gaps and everything before running JassHelper. If you get a JassHelper error it's really hard to tell what it is when I can't even read the code your thing generates.

PS: Yes, I have AdicOptimizer tunred off, and yes, it still removes all the indentation.

adichelper tries to remove all spaces and tabs by default, optimizer does more stuff but ADOLF said he will improve it even more...
 
Level 31
Joined
Jul 10, 2007
Messages
6,306
First-
JASS:
int x = 3;
int y = (++x)+(++x);

If you want that to display 9 instead of 10...

JASS:
int x = 3;
int y = ++x+x+++1;

I think that it works as intended and is perfectly fine. That to me is not a bug, it's just an error on the user's part. I have never seen a language that displays 9 on ++x+++x

a discussion as to the use of cjass
 
Last edited:
Level 9
Joined
Nov 28, 2008
Messages
704
I disagree with it removing any white space. It makes errors that much harder to read, and WC3 Map Optimizer does it on it's own.

Also, EoW,

PurplePoot said:
Note that this does not imply it will be allowed for JASS submissions and stuff.

I person will be submitting resources in it if I ever get the urge to. They can dump them if they want, but NOTHING about vJass besides its popularity seems like any reason it should be allowed and cJass not.

People got vJass because people found libraries and such a better way to distribute chunks of code and such, and so said "Oh, hey, wanna use this? Use JNGP!"

People SHOULD be getting and using cJass because it cuts down on writing time and a define itself is a great tool. cJass is also compatible with JNGP, and installs right into it. It took me personally less than a minute to install.

Not accepting submissions in cJass is rather stupid.
 
Level 14
Joined
Jun 13, 2007
Messages
1,432
the setup program asks to put in the filepath of my JNGP's folder. idk where that is located, can someone plz help me.

you should know where it is. Have you even installed it?

edit: I think that the command for importing files should be insteed of include it should be //! include
 
Last edited:
Level 8
Joined
Aug 4, 2006
Messages
357
This looks pretty sweet. I will use it if it becomes accepted for JASS submissions. I have no problems with the ++/-- operators, but you should definitely implement some form of anonymous functions, since creating separate filter functions and callback functions is just a pain in the ass (i.e. ForGroup(g, { KillUnit(GetEnumUnit()) } ) ).
 
Level 19
Joined
Nov 16, 2006
Messages
2,165
Code:
___________________________________________________________

BullGuard Scan Report
Scan Profile: "~10"
___________________________________________________________


----[  System Info  ]------------

OS Version:	Windows Vista Home Premium - Service Pack 1 (Build 6001) [2 * x86 CPUs] 
Physical memory:	2048 MB
System up-time:	0 days, 03 hours, 21 minutes, 02 seconds
BullGuard up-time:	0 days, 03 hours, 20 minutes, 01 seconds
TopLayer Version:	8, 7, 1, 17
FileSpy5 Version:	N/A
BdFileSpy Version:	3.14.0.64 built by: WinDDK
BsFileScan Version:	8, 5, 0, 71
Reconn Version:	N/A
MailProxy Version:	8, 5, 0, 21
AntiVirus Version:	8, 7, 0, 50

----[  Scan Parameters  ]------------

Folders to scan:
    None

Excluded folders:
    None

Files to scan:
    C:\Users\gebruiker\Desktop\cJassSetup.exe

Scan type:
    [o] Scan all files
    [ ] Scan program files only
    [ ] Scan custom extensions: 

    [ ] Exclude user extensions: 

    [ ] Scan boot sectors
    [X] Scan packed files
    [X] Scan archives
    [X] Scan emails
    [ ] Scan running processes
    [ ] Scan registry
    [ ] Scan IE cookies
    [X] Enable heuristic detection

    [ ] Scan default action
___________________________________________________________

Scan Statistics
___________________________________________________________

Scan started:	Tuesday, December 22, 2009 23:27:56
Scan duration:	0 days, 00 hours, 00 minutes, 02 seconds
Completion status:	Successful

Total files scanned:	44
Total files skipped:	0
Identified viruses:	1
Scan speed:	22.00 files/sec

___________________________________________________________

Infected Files
___________________________________________________________

----[  Infected Files  ]------------

Malware:	Trojan.Generic.2643557
    C:\Users\gebruiker\Desktop\cJassSetup.exe=>(NSIS o)=>lzma_solid_nsis0008

___________________________________________________________

Results after ROUND 0
___________________________________________________________

Scan started:	Tuesday, December 22, 2009 23:27:54
Scan duration:	0 days, 00 hours, 00 minutes, 02 seconds
Infections solved:	0
Infections left:	1
Viruses left:	1

----[  Files Still Infected  ]------------

Malware:	Trojan.Generic.2643557
    C:\Users\gebruiker\Desktop\cJassSetup.exe=>(NSIS o)=>lzma_solid_nsis0008

--> http://www.pctools.com/mrc/infections/id/Trojan.Generic/

Nothing more to say.
 
Level 19
Joined
Nov 16, 2006
Messages
2,165
Yes but this updater makes it get detected as a virus.
In my opinion, the updater is a very important piece of the program.

I'm pretty sure it will be important, however, I repeat myself again: everything can be made without any virus.

Overall, I don't think this would be good for hive's reputation if people their scanner detect a virus.
For example, a guest visits the website and downloads the tool.
Virus-scanner pops up : VIRUS FOUND.
I'm pretty sure that they instantly delete it and will have doubts about the hive.
That's my point.
 
Level 15
Joined
Jul 19, 2007
Messages
618
Now I need to use both, cJass and method operators.
Every time I use a method operator, I get errors.
Even with vJass syntax.

i am not sure, i am working on campaign and i use operators a lot... maybe u write wrong syntax... else i dont know why it would not compile.

JASS:
nothing operator value= (integer val) { this.val = val }
 
Level 19
Joined
Oct 15, 2008
Messages
3,231
What's the difference between cJASS, vJASS and GUI guys...? Sorry I had to post here, but I'm really really confused at the moment of what this tool does...

PS: Erm... Is this the same as JASSCraft (And where can I get it?)?
 
Level 21
Joined
Dec 9, 2007
Messages
3,096
GUI is the basic trigger interface you have in the triggers editor.
Jass is the programming language of the warcraft engine. For a map to run the triggers, they are converted to Jass when you save the map. You can also convert GUI triggers to Jass using the following way: Select your trigger, click the Edit tab and select Convert to Custom Text.
vJass is a magical extension to Jass. It allows much more things like structs and textmacros. (there are a lot more!)
cJass is a wonderful extension to vJass. This has a C-like syntax and introduces the Defines which can have arguments and can be overloaded!

For more information, send me a private message or leave a visitor message at my profile.
 
Top