Comments are closed

cJass on the Google Code.
Our BugTracker (recommend to post bugreports and features request there).
Beta tester notes.

all times are GMT +03:00
Latest posts

Pages: 1 2 3 4 5 6 7 8 9 10 [11] 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27

posted at 06/02/10 12:26
Sebra

expr ( bool?0:1, another_bool?1:0)
->
if bool then
if another_bool then
expr ( 0, 1 )
else
expr ( 0, 0 )
endif
else
if another_bool then
expr ( 1, 1 )
else
expr ( 1, 0 )
endif
endif
nested of course.
Sorry for not subscribe first.
It seems it is impossible to edit.

posted at 06/02/10 00:56
Nestharus

ok)

posted at 06/02/10 00:14
Nestharus

It's just a bundle of macros...
If you want to see it I can pastebin it I suppose since it's lot.. >.<
The problem is like every other macro doesn't get its //! endtextmacro replaced. At least that's what I saw... juts try makin 4 macros and see what happens -.-... or try making like 50 macros and see what happens. All I know is that I can't have cjass enabled for the map that has that code.
there is no code=/

posted at 05/02/10 23:26
Nestharus

Ok then ^_-.
Well my current suggestion is to release a hot fix to fix up textmacros as that's a pretty serious bug. I can't even have cjass enabled at this point : (... and anyone who uses any vjass resources with textmacros in the code can't have it enabled /cry.
show code plz
~ADOLF

posted at 05/02/10 23:10
Guest

This idea is known already:
expression( condition ? true_result : false_result )
translated to
if( condition ) then
expression( true_result )
else
expression( false_result )
endif
There is are problems with logic but minor.
what about this:

expr ( bool?0:1, another_bool?1:0)

?
must consider how it will be difficul...
~ADOLF

posted at 05/02/10 07:29
Nestharus

Oh... great idea just now...
ternary operators ; ).
like for struct, could just write this-
thistype this = (recycledCount > 0) ? recycledInstance[--recycledInstanceCount] : instanceCount++

posted at 05/02/10 05:10
Mooglefrooglian

"@All people who want additional preprocessor
Please clarify, what do you expect us to do? =) We still can't clearly understand why you want it so much and surely don't know what we can do about it."
If you could provide a simple way to call an exe in a folder from the place AdicHelper operates from (or JNGP) and have a simple config file you can just pop in the AdicHelper folder without overwriting anything in order to have everything set up, it would be perfect.
I have my own preprocessor at the moment, but I hate editing we.lua and I dont want to make an installer so I can give it to my friends. So it's very meh at the moment.
Its not importnat though. I'd just like to be able to give a friend a folder, have him put in his JNGP folder, then add one text file to AdicHelper's directory and have everything handle itself.
If you could do that, it woul dbe great. Thanks.

posted at 05/02/10 05:08
Nestharus

Now you broke textmacros... you're not replacing all of the //! endtemxtacro with }, so it'll throw unclosed block errors with them...

posted at 03/02/10 00:37
Dark Dragon

Hi again!
i do apologize!
my pc is acting strange and its not ur bug ADOLF its on my PC, so just ignore my last few posts cJass works same as before...
once again sry for bothering u!
~DD

posted at 03/02/10 00:25
Dark Dragon

plz merge my post i just mistyped
"takes str sx", it should be "takes strx sx"
Sry!

posted at 03/02/10 00:23
Dark Dragon

Hi and thanks for the link!
here is the code which compiler tells me is wrong!

string operator [] (integer index) { return SubString(this.str, index, index+1) }
nothing operator []= (integer index, string char) { this.str = SubString(this.str, 0, index) + char + SubString(this.str, index+1, this.len); if (char == null char == "") { this.len-- } }
boolean operator < (strx sx) { return this.len < sx.len }
boolean operator == (strx sx) { return this.str == sx.str }

it compiles to:

method operator== takes str sx returns boolean

Regards and i hope to see more updates :)
~DD

posted at 02/02/10 23:56
ADOLF

posted at 02/02/10 23:15
Dark Dragon

Hi ADOLF!
i dl-ed the .35 and my libs wont compile anymore, == operator bugs so could i get link to .34 plz!
Thanks and greets!
~DD

posted at 31/01/10 21:26
Nestharus

That'd be good for an Lua block ADOLF, but as you see, you do have to pass it to an exe. Lua works by having no standalone interpreter. You use the dll in an exe and treat that exe as the interpreter.
Like I said, I am personally making a tool for Euphoria as it's a lot faster than Lua, but all the tools like Object Merger run on Lua. Grimoire also runs on Lua ^^.
Being able to do preprocessing within WE in Lua would be a plus, but Euphoria would be better, hence my tool : P
Also it wouldn't be as simple as those blocks ADOLF... some Lua resources might want to use other Lua resources within the map... and each block is its own environment, the code can't intermingle unless you go to the hard drive... plus you don't know the order of execution... so you'd have to merge non tool blocks and do something with the tools...
I have specs from my old Lua ideas, and there are links somewhere, lol... but yea... I'd rather there just be a Euphoria preprocessing tool and maybe have it so Lua doesn't have ugly //! i in WE, like #lua or something instead.
And there are now quite a few resources that are using Lua, most of them by jesus4lyf on thehelper.net ;o.

posted at 31/01/10 10:47
ADOLF

//! lua /*or any another keyword*/
//! endlua
That something like this?

posted at 31/01/10 10:18
TheLifelessOne

Honestly, I kinda lost it... :/

posted at 31/01/10 10:12
Nestharus

Lifeless... I gave you a file with all of the stuff from all of JASS.... the only thing it's missing is anonymous functions as those are new...
Anyway, this list should be placed somewhere) We do it.
~ADOLF

posted at 31/01/10 08:45
TheLifelessOne

Hey, can you guys give me a full list of current and future cJASS-specific keywords?
I just got my JASS parser to highlight (GeSHi language file, still working out a few bugs, but it works), and I want to include cJASS highlighting.
We will do it after the release of the stable version and readMe update. I think it will be next week.
~ADOLF

posted at 31/01/10 03:29
Nestharus

Ok... what we're talking about is first, fix the 2 bugs, the one with external blocks of code for Lua (replacement of $ with tttttt kills it..., it has to be $ for external blocks in $FILENAME$). If you don't know what Lua external blocks are, you can check Grimoire as it's a feature of it. It'll be in the grimext folder. Killing grimoire features isn't cool in my book, especially since you are in essence killing Object Merger, Pather, etc... which quite a few resources do happen to use.
The next is fixing implementation of modules with methods (you have a local go in front of them, which kills it). I have previous examples of this bug in other posts.
Finally, the actual preprocessing that you guys could help with would be using an interpreted language to generate code. I mean, I'm already planning to do this now, but here's my little thread on the main subject now for the actual tool ^_^
Yes, yesterday we looked all your bug reports, and I will fix these two bugs soon.
~ADOLF

posted at 31/01/10 03:27
TheLifelessOne

what do you expect us to do?
Lua is broken with cJASS. It doesn't compile for some reason (I believe cJASS changes something).
So we want "#lua" single line preprocessor definitions, which will not cause errors during the parsing, and lua { } blocks for multiple lines.
Nestharus knows more about it than I, so he can describe it better. I'm sure I got at least one thing wrong. :/

posted at 30/01/10 23:31
Van Damm

@All people who want additional preprocessor
Please clarify, what do you expect us to do? =) We still can't clearly understand why you want it so much and surely don't know what we can do about it.

posted at 30/01/10 23:18
Dark Dragon

Hi VD!
yeah i did not expect this "type extends" feature to be implemented any time soon as for me only lambda funcs matter now! i have a lot of code which forces me to write funcs all around in the libs and that makes it unreadable, takes more time to write, longer code and just some boring func names...
i am glade that u guys are trying to fix this anonym funcs!
Regards and gl!
~DD

posted at 30/01/10 16:22
Dark Dragon

ahh just one more thing!
could we get this feature implemented once lambda funcs are.
type void extends nothing()
type math extends real(real)
type rescuefunc extends nothing(unit, unit)
this are function pointers, i think they are better than function interface takes returns...
if you think its a good suggestion and once you are done with anonym funcs it would be great if this could get implemented.
Greets!
~DD
We'll take it into consideration, but don't expect this functionality to be implemented soon.
~VD

posted at 30/01/10 14:57
Dark Dragon

Hi!
well i just dl-ed the .34 and yeah in structs lambda funcs work now, in defines well ill show the code:

ForGroup(g, func) = ForG##roup(g, func)
ForGroup(g, func, val) = { ForGroup_Value = val; ForG##roup(g, func) }
boolean IsGroupDead(group g) {
bj_isUnitGroupDeadResult = true
ForGroup(g, lambda nothing() { bj_isUnitGroupDeadResult = bj_isUnitGroupDeadResult && !UnitAlive(GetEnumUnit()) })
return (bj_isUnitGroupDeadResult)
}

it is compiled to this:
function IsGroupDead takes group g returns boolean
set bj_isUnitGroupDeadResult=true
set ForGroup_Value=size
call ForGroup(g, function cj_anonym__2)
return ( bj_isUnitGroupDeadResult )
endfunction

it uses three args but i injected only 2, as well some var "size" in define its name is "val" so i really dont know how did it get to "size".
however most important bug is the one i cant figure by any means... it is that when i use lambda funcs sometimes it works and somtimes crashes... even my PC restarts itself. it seems its smth with RAM. now its really odd bug but for example if i use lambda funcs inside specific func then cJass decides will it compile or not, if it will then i cant declare lamda funcs in defines, if it crashes in funcs then i can declare them in defines... it depends on which libs i included. for example i include hooks.j only it will compile lambda func in my hook define <InitBlizzard()> but if i include all libs then it crashes... in other words it depends on "how code looks" and from that cJass decides will it compile inside specifc scope, lib, func, define and whatever else could be... its just that if cJass decides that it will compile in specifc part of code then i can declare as much as i want of lambda funcs, but if cJass decides not to then i cant declare 1 or more lambda funcs.
i cant help u more with this as its really odd and i cant figure it out, second problem is that i dont know asm so i am of no help in finding where could bug be...
there is still bug with "void pointer function" "void" is my type for function which takes and returns nothing and i dont expect this to work until code funcs work fully correct.
i am glade to see updates and i hope to see more of them ;)
Regards!
~DD
We're now working on fixing the "anonymous functions inside of define" bug and will get back on these mysterious issues later.
~VD

posted at 29/01/10 11:54
Dark Dragon

Hi TokiZR and welcome to the world of cJass!
we are glade you like cJass and to hear some of new suggestions.
in your suggestion <new $type$> there is a problem which makes it impossible to implement.
it is because there might be a lot of ways where keyword "new" is actually used and thats why we cant make $type$ be any keyword. in other words ADOLF "the main cJass coder" cant know if word is "type" or something else.
however good thing is that that what you wish can already be done with struct types and with blizzard own implemented ones.

#define {
<new vector> = vector.create
<new group> = CreateGroup
}
struct vector {
real x, y
static vector create(real x, real y) {
vector this = allocate()
this.x = x; this.y = y
return this
}
}
nothing init() {
group g = new group()
vector v = new vector(0., 0.)
}

i hope you enjoy all new features that will get implemented in future cJass versions and to make some nice mods for WC3
Regards!
~Dark Dragon

Pages: 1 2 3 4 5 6 7 8 9 10 [11] 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27

[back to top]