• 🏆 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!

JASS and vJASS

Status
Not open for further replies.
Level 15
Joined
Oct 29, 2012
Messages
1,474
Well it's not about triggers or what .. I just need to know some info .


I already knew what BJs are and how a JASS script is built ( from conditions events and actions )

The problem is : People say JASS is dead and vJASS is more used and better

Show me a little example about this difference <3
Not thank you
 
Level 22
Joined
Sep 24, 2005
Messages
4,821
vjass provides more scripting tools for jass, jass isn't dead, it's just easier to do things using vjass. There's also WurstScript.

JASS:
// C like struct
struct extends array
 integer a
 integer b
 integer c
 integer d
endstruct

// C++ somewhat-like classes
struct data
 integer a
 integer b
 integer c
 integer d

 // some methods ...
 method sum takes nothing returns integer
  return .a+.b+.c+.d
 endmethod
endstruct

This and a lot more features.
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
C++ adds some functionality to C structs, because C has very small amount of OOP, you can only have so called POD structs in C, which only contain nonstatic member variables, without member function or destructor or constructor.

C++ struct only differs from class with the fact that struct's members are default public, class's are private

Also struct in vJass is not truly equal to struct in C, you cant play with structs in C the way you can in vJass(you can actually change the value for members to instance you dont even know exists in vJass, without having reference or value to it)
 
Status
Not open for further replies.
Top