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 29/01/10 11:15
TheLifelesOne

Lua!
One good thing I'd like to have on cJass is having replaceble keywords in "define", let me explain myself:
I think defines can have arguements. Is that what you mean?
Lua issues will be fixed in next update. They are high priority now.
~VD

posted at 29/01/10 04:34
TokiZR

First of all I have to say that I own all my progress in learning and coding jass to cJass and vJass, without them I would never get to work with jass scripting.(I'm used to coding on OO so JASS2 was hell boring and plus it takes much more typing).
Keep doing the great work.
Oh, almost forgot why I was writting.
One good thing I'd like to have on cJass is having replaceble keywords in "define", let me explain myself:
I'd like this to work:
define
{
//structs
<new $type$()> = $type$.create()
}
where $type$ would be matched to any word(\w+)
this may be useful for many other things but my real will was just that this functionality was native for structs, I mean, any struct could be initialized trough this alternative call
: new "Type"(), like in most OO languages.
I'd be very pleased if this was added to cJass and congratulations for making JASS even more OO.

posted at 28/01/10 06:22
TheLifelessOne

Seriously guys. Any updates on fixing Lua? This is important stuff!

posted at 27/01/10 23:00
Dark Dragon

Hi!
i tryed my best to figure out this bug...
what i can say is this:
same library which i included with anonym func crashed cJass, but then i placed all code from that lib in my map directly and deleted #guard command all else was cnp and it compiled fine.
as well it is important to say that when i place that anonym func in another func in include it works fine but when i place anonym func in define which is declared in that include file then it crashes...
thats all i could have figured out and i hope it helps at least a bit!
Regards!
~DD

posted at 27/01/10 21:01
TheLifelessOne

Any updates regarding Lua?

posted at 27/01/10 20:11
Dark Dragon

one more bug, but its... duno how to explain its really odd.
when i write anonym func in define and that "init" define is called in main init func in that library it crashes!
in scope i did the same but did not crash... in library it does not crash when i write anonym func in func but does when i write it in define...
scope is opposite of library...
i dont know if thats the case but its really an odd crash with cJass! maybe when 2 funcs both have anonym funcs and are both placed one after another!
i think its best to test this one urself coz i really cant figure why does it crash...
Regards!
~DD

posted at 27/01/10 19:15
Dark Dragon

k one more bug which i found while coding structs...
if i use anonym funcs in structs it should be compiled to:
static method cj_anonym__N takes ...
because if its a func and i have private members or even whole struct in scope/lib it tells me that "this" type is not of type that allows "." syntax...
Greets!
~DD

posted at 27/01/10 19:04
Dark Dragon

Hi!
very nice update, there are just 2 things i noticed that do not work now.
  1. if i hook ForGroup with defines
  2. if i use anonym funcs for pointer funcs

function interface void takes nothing returns nothing
nothing test() {
void v = lambda nothing() {}
}

Greets and thanks for all ur hard work!
~DD

posted at 27/01/10 18:15
N.e.k.i.t

static ifs are not fixed.
Fixed.
~ADOLF

posted at 27/01/10 17:28
ADOLF

I fix a few (not all) bugs in 1.4.1.30
Далі писатиму рідною мовою, є одне питання: зараз анонімні фунції, які використовуються у методах пишуться безпосередньо перед структурою. Як помітив Некіт, це призводит до деяких помилок (наприклад використання thistype немає сенсу у цьому випадку). В мене таке питання:

struct s {
static nothing anon () {}
nothing fx () {
ForGroup(null, ?function anon?)
}
}

Як я можу викорустовувати статичний метод як звичайну функцію, та передавати її в якості аргумента?

posted at 27/01/10 11:43
Dark Dragon

Problem with {} in single line defines is that it can be used as argument but {} moves code in next line... if you want multi line define you can use {} but that define cant be used as argument. there is just one thing ADOLF could do and that is this:

#define <TestRet()> = {
bj_lastCreatedUnit = CreateUnit(...)
return bj_lastCreatedUnit
}
nothing test() {
KillUnit(TestRet())
}
that would be compiled to:
nothing test() {
bj_lastCreatedUnit = CreateUnit(...)
KillUnit(bj_lastCreatedUnit)
}

return in define says which line is parsed as argument.
about modules it might bug i did not test but i suggest you to use:

#define <implement omg> = {
integer hi
}
struct Ha {
private nothing hello() {
implement omg // works just fine
}
}

np ADOLF and take ur time, i am just glade that anonym funcs got in cJass.
Regards!
~DD
This bug is fixed now =)
~VD

posted at 27/01/10 11:20
Nestharus

So is there any word on these bug fixes?

Your macro replacement totally screwed up all of external blocks for lua..
//! externalblock extension=lua ObjectMerger $FILENAME$
needs to be fixed asap as this is a critical component of jasshelper -.-.

library a
module omg
local integer hi
endmodule
struct Ha
private method hello takes nothing returns nothing
implement omg
endmethod
endstruct
endlibrary
I run that with cJASS disabled and compiles fine and runs like I expect it to run (puts the code there). I turn cJASS on and it puts local in front of the implement and throws a syntax error.

posted at 27/01/10 10:19
ADOLF

Thanks for reports, I will fix it soon as posible

posted at 27/01/10 03:28
Nestharus

So what if you had a one line definition and you wanted to add more lines and then change it back to one line.
I too consider that a bug : P.
Also, if you are really going for C style, should allow things like one line if statements without the {}.
: )

posted at 27/01/10 03:24
Mooglefrooglian

@Dark Dragon, that little syntax tidbit was not found in the manual and makes no sense anyways. I would still consider it a bug. You should be able to define on one line like that.

posted at 27/01/10 02:24
Dark Dragon

@ Mooglefrooglian
Thats because you did it wrong...
you must not use {} in single lined defines...

posted at 27/01/10 02:07
Mooglefrooglian

In case you do have time and nevver looked:
if RectContainsCoords(where, LoadX(i, ii), LoadY(i, ii))
LoadX and LoadY are defines, by the way, defined as:
#define private LoadX(lsID, pointID) =
{
LoadReal(Hash, lsID, pointID * 2)
}
#define private LoadY(lsID, pointID) =
{
LoadReal(Hash, lsID, pointID * 2 + 1)
}
It is converted to:
if RectContainsCoords(where,LoadReal(Lighting__Hash,i,ii*2) then
call ,LoadReal(Lighting__Hash,i,ii*2+1)
Notice how the LoadY is moved down a line, and the brackets are unfinished.
Is a bad bug which should be fixifed. D:
Fixed in 1.4.1.31. But I not sure - may receive a lot of new bugs.
~ADOLF

posted at 27/01/10 01:47
Dark Dragon

Sry but i forgot about boolexpr...

This crashes!
boolexpr bx = Filter(lambda boolean() {return false})
This does not compile!
boolexpr bx = Filter(lambda boolean() { KillUnit(GetFilterUnit()); return false })

K i am done for today xD
Greets!
~DD

posted at 27/01/10 01:38
Dark Dragon

K its omg but i found why it crashes...

library tester initializer init
{
#define E = 2.71828
private nothing init() {
code c = lambda nothing() { KillUnit(GetEnumUnit()) }
ForGroup(GetUnitsInRectAll(GetPlayableMapRect()), c)
}

well duno why but it crashes... i will remove that E define for now!
still ForGroup hook bug and pointer function ;)
Greets!
~DD
Huh, fixed. This was the most funny bug (technically)
~ADOLF
edit: Oooops, double kill=) Fixed one more bug
~ADOLF

posted at 27/01/10 01:15
Dark Dragon

k i found which lib does not compile...
its math one, there might be case that other libs do not compile but of all i tested math is first one that does crash... and if any other does its from same reason that math.j does.
math.j requires 2 libs LibCore and LibHooks but this two libs compile correctly, exept that LibHooks hooks some of math funcs so it requires math.j to be included but LibHooks does not require LibMath it just hooks few things...
so here is math.j
Hope anonym funcs get fixed :)
Regards!
~DD

posted at 27/01/10 00:46
Dark Dragon

Sry for double post but i found another bug!
i hooked ForGroup with #define and used anony func, what it did was place ) in new line

ForGroup(g, lambda nothing() {})
compiled to:
ForGroup(g, function cj_anonym_2
) // error this is in new line

Greets!
~DD

posted at 27/01/10 00:36
Dark Dragon

Hi ADOLF and VD!
iam so happy to see anonymous functions implemented!
so i will report bugs which i found!

function interface math takes integer i returns integer
nothing test() {
math m = lambda integer(integer i) {return i}
}

that example was compiled in to "function cj_anonym_2", while it should be: "math.cj_anonym_2" or simply "cj_anonym_2".
second bug is that i cant describe... for some reason when i include my libs map compiles but when i write a single anony func it crashes at point where it says: "Parsing: functions and variables"
then again if i remove my libs and write only anon funcs it works... i really dont know which code could cause this since i have so much libs that its impossible for me to find that out... when they are compiled all together there is almost 10 000 lines of code and its really hard to find why it crashes...
i would really be grateful if you could find out why does it crash, but anyway i am already happy that u implemented anony funcs :]
All best!
~Dark Dragon

posted at 26/01/10 23:22
Nestharus

It'd be nice if the serious bugs were fixed... like the module bug and the Lua external block bug.

posted at 26/01/10 23:22
TheLifelessOne

UPDATES? <3
Can we please get those Lua fixes? :D

posted at 26/01/10 22:09
Mooglefrooglian

Anonymous functions confirmed to be working just fine, although I do wish we could avoid the lambda void(). Ah, well, I guess it makes sense why you'd want it.
Yay for updates!

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]