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

Should cJass be an accepted language on TheHiveWorkshop?

Should cJass be allowed on TheHiveWorkshop?

  • Yes

    Votes: 15 62.5%
  • No

    Votes: 6 25.0%
  • I don't have enough information so I probably shouldn't even be voting

    Votes: 3 12.5%

  • Total voters
    24
Status
Not open for further replies.

Bribe

Code Moderator
Level 50
Joined
Sep 26, 2009
Messages
9,456
cJass has been updated with some pretty important fixes. It's apparently no longer bugging with vJass resources.

Here is their link: http://cjass.xgm.ru/feedback.php

cJass was left for dead for quite some time, however its new incarnation appears to have been re-kindled. There also is a promise for a "stable release" in the coming weeks to fix some remaining bugs.

Edit: It's important to mention there is still one major bug with the cJass optimizer a side effect of which compreses strings to turn " " into "". Unless the optimizer was fixed it's not usable. This poll is to get a general idea of the attitude people have towards cJass.

Is allowing cJass resources something that you support? Please share your opinions.
 
Last edited:
Level 31
Joined
Jul 10, 2007
Messages
6,306
cJASS still has many bugs left to be resolved and its optimizer optimizes strings.


Until at least all of the bugs that break JASS/vJASS are resolved, I don't think it should be acceptable. To my knowledge, there is only 1 bug that will actually break JASS/vJASS left, and that is in the optimizer. There are still a few cJASS specific bugs, but at least they won't break plain vJASS/JASS code : p.


So yea, once that optimizer is fixed, I'm all for cJASS =).
 
Level 17
Joined
Jan 21, 2010
Messages
2,111
overall, i think it's better to have more languanges, as it widens our knowledge of a progam, as i don't have a single "Blink" on this languange, but i support this to be one of the most used languange, since we already have vJass, Jass, & Zinc (or more?)
 
Level 31
Joined
Jul 10, 2007
Messages
6,306
overall, i think it's better to have more languanges, as it widens our knowledge of a progam, as i don't have a single "Blink" on this languange, but i support this to be one of the most used languange, since we already have vJass, Jass, & Zinc (or more?)

So, you think cJASS in its current state, which will kill your strings, should be acceptable? : P
 
Level 5
Joined
Dec 6, 2009
Messages
79
Last edited:

Deleted member 177737

D

Deleted member 177737

(Can't use anything that isn't GUI)

Is there any difference between all of them?
 

Deleted member 177737

D

Deleted member 177737

Between GUI and JASS, yes. Rest converts to JASS, but cJASS allows for a lot of useful things like definitions.

I meant is there any big difference between Jass, vJass, cJass, etc... ?
 
Level 31
Joined
Jul 10, 2007
Messages
6,306
cJASS converts to vJASS
vJASS converts to JASS

cJASS has extra tools like definitions that can be highly useful and includes all vJASS features
vJASS has easy OO syntax support and free declaration of globals and all JASS features
JASS has just plain functions and access to GUI variables


So yes, it's easier to code in cJASS than it is in vJASS and it's easier to code in vJASS than it is in JASS, but they all result in the same thing. For a coder, less time working on something and better readability is a big plus.
 

Deleted member 177737

D

Deleted member 177737

So if I wanted to learn one of the Jasses it would be easiest to learn cJass?
 
Level 5
Joined
Dec 6, 2009
Messages
79
http://code.google.com/p/cjass/wiki/BetaTestNotes

please read this ^

Also, example of simple cjass spell(with hash):


JASS:
callback onUnitSpellCast('test'){
    timer t = CreateTimer()
    int id = GetHandleId(t)
    float x = GetSpellTargetX()
    float y = GetSpellTargetY()
    unit u = GetTriggerUnit()
    unit n = CreateUnit(GetOwningPlayer(u), 'dmmy', x, y, 0.)
    UnitAddAbility(n, 'Apiv')
    UnitAddAbility(n, 'Aloc')
    SaveUnitHandle(hash, id, 0, n)
    SaveUnitHandle(hash, id, 1, u)
    SaveEffectHandle(hash, id, 2, AddSpecialEffectTarget("Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTo.mdl", n, "origin"))
    SetUnitScale(n, .6, .6, .6)
    TimerStart(t, .1, true, lambda void(){
        timer t = GetExpiredTimer()
        int id = GetHandleId(t)
        unit n = LoadUnitHandle(hash, id, 0)
        unit u = LoadUnitHandle(hash, id, 1)
        float x, y
        if (IsUnitType(n, UNIT_TYPE_DEAD)){
            DestroyEffect(LoadEffectHandle(hash, id, 2))
            DestroyTimer(t)
            FlushChildHashtable(hash, id)
            return
        }
        for(int i = 0; i < PlayerCount; i++){
            if (distun(n, Hero[i]) <= 128. && !IsUnitType(Hero[i], UNIT_TYPE_DEAD) && GetOwningPlayer(n) != GetOwningPlayer(Hero[i])){
                x = polarx(u, angleun(n, u), 64.)
                y = polary(u, angleun(n, u), 64.)
                effectPoint("Abilities\\Spells\\NightElf\\Blink\\BlinkTarget.mdl", x, y)
                effectPoint("Abilities\\Spells\\NightElf\\Blink\\BlinkTarget.mdl", GetUnitX(Hero[i]), GetUnitY(Hero[i]))
                SetUnitX(Hero[i], x)
                SetUnitY(Hero[i], y)
                damageTarget(u, Hero[i], 75.)
                KillUnit(n)
                break
            }
        }
    })
}
 
Level 31
Joined
Jul 10, 2007
Messages
6,306
Billion bugs

http://code.google.com/p/cjass/issues/list


I can't even run the optimizer on some maps >.>. It too crashes.


The only thing that seems to never crash is Remove Unused Code, but it doesn't even work since it doesn't remove all unused code >.>.


And auto flush apparently only works with adic parser enabled -.- (if it works at all).


What I have learned is that all leakable handle locals must be nulled, even if you are returning the local >: o. This means that if you have something that like returns a unit and stores that unit into a local before returning it, yes, your script Leaks >: O.

The way to fix this is to temporarily set it to a global... yes.. and then null the local and return the global.


Only in JASS do you have to go through such craziness in order to even fix a leak... no, I shouldn't say that.. visual c++/cli is even more bs than JASS is.
 
Last edited:
Status
Not open for further replies.
Top