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:00Latest 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/09/09 23:33Dark Dragon
It's not a bug, and it's mentioned in the manual. If you have a define with no arguments in a group of overloaded defines, you have to call it with empty braces (). ADOLF told that he'll think of a way to get rid of this limitation, but for now it's so.
~VD
posted at 29/09/09 20:17Dark Dragon
That's not a bug. For now enums act like enums in C, not C++. They are all integer, not their own types. I asked ADOLF and he told me that he'll think about extending them with C++ like behaviour.
~VD
posted at 29/09/09 17:55Dark Dragon
posted at 29/09/09 02:16Dark Dragon
<div class="code">void test () {
CreateNUnitsAtLoc(1,'hfoo',GetLocalPlayer(),Location(0,0),0)
unit u = bj_lastCreatedUnit
}</div>
will become
<div class="code">function test takes nothing returns nothing
local unit u
call CreateNUnitsAtLoc(0,0x68666F6F,GetLocalPlayer(),Location(0,0),0)
set u=bj_lastCreatedUnit
endfunction</div>
CreateNUnitsAtLoc(1,'hfoo',GetLocalPlayer(),Location(0,0),0)
unit u = bj_lastCreatedUnit
}</div>
will become
<div class="code">function test takes nothing returns nothing
local unit u
call CreateNUnitsAtLoc(0,0x68666F6F,GetLocalPlayer(),Location(0,0),0)
set u=bj_lastCreatedUnit
endfunction</div>
You can test it yourself =)
~VD
~VD
posted at 27/09/09 20:03Dark Dragon
Ok, I've added <span class="code">GetSpellTargetX/Y</span> - they will be present in the release version.
VD
posted at 27/09/09 19:25Dark Dragon
Yeah, I think the arrays will be as you suggest.
I'm still thinking about comments =)
And about 1.4 - it will be out soon and will contain no significant changes except reworked updater, included manual and increased stability. After the release we'll maintain two branches: stable and development.
VD
posted at 27/09/09 17:53Dark Dragon
That's not a bug, rather a feature. While we use classic array definition style, it will be so. Hope, ADOLF will implement <span class="code">int j[]</span> -like array declarations.
VD
posted at 27/09/09 15:29Dark Dragon
This won't happen because of parser internal logic.
Btw, can you please perform intensive testing of +=, -=, /=, *=, ++ and -- operations on different sets of data including arrays etc? We need to know if there are any bugs with code generation. You can find generated code in "war3map_parsed.j" in AdicHelper folder.
Code like this: <span class="code">a += b[c()]++ + b[c()]++</span> or <span class="code">a = ++b[c(++b[c(i)])]</span> etc, etc,
posted at 27/09/09 11:31Guest
Your code won't work as you expect because all references to system values are replaced at map save. So the COUNTER isn't bugged, you're just using it in wrong way:
<div class="code">scope Demo initializer Initialization
private function Initialization takes nothing returns nothing
local integer x
loop
set x = COUNTER <i>//COUNTER is replaced to 0</i>
exitwhen x == 3
call printf(I2S(COUNTER)) <i>//COUNTER is replaced to 1</i>
endloop
endfunction
endscope</div>
It's obvious.
<div class="code">scope Demo initializer Initialization
private function Initialization takes nothing returns nothing
local integer x
loop
set x = COUNTER <i>//COUNTER is replaced to 0</i>
exitwhen x == 3
call printf(I2S(COUNTER)) <i>//COUNTER is replaced to 1</i>
endloop
endfunction
endscope</div>
It's obvious.
We can't have current date and time in the game because war3 doesn't have corresponding functions and this cannot be fixed without hacking the game.
And as for DEBUG - it's better than vJass's debug cause it can be used to make lots of code debug-only, like:
<div class="code">#if DEBUG
void debug_func() {
...
...
}
#endif</div>
So the <span class="code">debug_func</span> will be in the map only if "Debug mode" is checked.
<div class="code">#if DEBUG
void debug_func() {
...
...
}
#endif</div>
So the <span class="code">debug_func</span> will be in the map only if "Debug mode" is checked.
or
<div class="code">void debug_func() {
...
<i>// code #1</i>
...
#if DEBUG
...
<i>// debug-only code</i>
...
#endif
...
<i>// code #2</i>
...
}</div>
<div class="code">void debug_func() {
...
<i>// code #1</i>
...
#if DEBUG
...
<i>// debug-only code</i>
...
#endif
...
<i>// code #2</i>
...
}</div>
VD
posted at 26/09/09 17:26Guest
<div class="code">include "cj_print.j"
void Test () {
printf("Today is ^v",DATE)
}
</div>
or
<div class="code">define GetDateString = `DATE`
printf("Today is ^v",DATE)
}
</div>
or
<div class="code">define GetDateString = `DATE`
void Test () {
BJDebugMsg("Today is " + GetDateStirng)
}
</div>
BJDebugMsg("Today is " + GetDateStirng)
}
</div>
VD
posted at 24/09/09 03:02Mooglefrooglian
posted at 24/09/09 00:26Van Damm
posted at 22/09/09 12:32Guest
<s>Thanks for report, we'll fix that.</s>
Bug fixed in 1.3.4.20
Bug fixed in 1.3.4.20
VD
posted at 22/09/09 04:52weaaddar
We'll implement templates soon.
VD
posted at 21/09/09 12:03Dark Dragon
posted at 21/09/09 00:17Van Damm
<div class="code">int test1 () {
int fx = 0
if (fx++ == ++fx) {
fx--
}
return ++fx + fx++
}</div>
will become
<div class="code">function test1 takes nothing returns integer
local integer cj_v666_r
local boolean cj_v666_b
local integer fx = 0
set fx = fx + 1
set cj_v666_b = fx==fx
set fx = fx + 1
if cj_v666_b then
set fx = fx - 1
endif
set fx = fx +1
set cj_v666_r = fx + fx
set fx = fx + 1
return cj_v666_r
endfunction</div>
int fx = 0
if (fx++ == ++fx) {
fx--
}
return ++fx + fx++
}</div>
will become
<div class="code">function test1 takes nothing returns integer
local integer cj_v666_r
local boolean cj_v666_b
local integer fx = 0
set fx = fx + 1
set cj_v666_b = fx==fx
set fx = fx + 1
if cj_v666_b then
set fx = fx - 1
endif
set fx = fx +1
set cj_v666_r = fx + fx
set fx = fx + 1
return cj_v666_r
endfunction</div>
And another example:
<div class="code">int test2 () {
int fx = 0
if (++fx == 0) {
fx--
}
return ++fx
}</div>
will become
<div class="code">function test2 takes nothing returns integer
local integer fx=0
set fx = fx + 1
if fx==0x00 then
set fx = fx - 1
endif
set fx = fx + 1
return fx
endfunction</div>
<div class="code">int test2 () {
int fx = 0
if (++fx == 0) {
fx--
}
return ++fx
}</div>
will become
<div class="code">function test2 takes nothing returns integer
local integer fx=0
set fx = fx + 1
if fx==0x00 then
set fx = fx - 1
endif
set fx = fx + 1
return fx
endfunction</div>
posted at 19/09/09 20:32Dark Dragon
posted at 19/09/09 11:40Dark Dragon
posted at 17/09/09 10:00nestharus
posted at 16/09/09 23:40nestharus
We'll think about plugins, but I still bon't understabd them =]
As for 12. - you can just define it in your lib or use cj_antibj_base.j - it's included to all cjass distributions.
VD
posted at 16/09/09 17:05Dark Dragon
posted at 16/09/09 14:26nestharus
<ol style="padding-left:30px"><li>Will never be possible.</li>
<li>I see no need in that =)</li>
<li>We'll think about that</li>
<li>That's vjass's internal parsing logic, or what do you mean?</li>
<li> see 6.</li>
<li> Anyway, those will be compiled to function calls, but we'll consider that idea</li>
<li>; are already there and is not necessary to avoid breaking backwards compatibility. Line continuations \ are also there.</li>
<li><span class="code">define main = initializer</span>, why not do it yourself?</li>
<li>For now - not, but maybe in the future.</li>
<li>Dunno why we have to include them. If you want, just write a library and usó it. maybe stacks will be included to our standard lib when templates arrive.</li>
<li>I'll look into that.</li>
<li>Again, define goes just well. Even more, there is cj_print.j, which you can use.</li></ol>
<li>I see no need in that =)</li>
<li>We'll think about that</li>
<li>That's vjass's internal parsing logic, or what do you mean?</li>
<li> see 6.</li>
<li> Anyway, those will be compiled to function calls, but we'll consider that idea</li>
<li>; are already there and is not necessary to avoid breaking backwards compatibility. Line continuations \ are also there.</li>
<li><span class="code">define main = initializer</span>, why not do it yourself?</li>
<li>For now - not, but maybe in the future.</li>
<li>Dunno why we have to include them. If you want, just write a library and usó it. maybe stacks will be included to our standard lib when templates arrive.</li>
<li>I'll look into that.</li>
<li>Again, define goes just well. Even more, there is cj_print.j, which you can use.</li></ol>
VD
posted at 16/09/09 01:06MasterofRa
Yeah, as I thought, the reason is that experimental thingy. Please use 1.3.4.10 until we fix it. And I will now remove .11 from autoupdate.
Thanks!
VD
posted at 16/09/09 00:23MasterofRa
Can you please <a href="mailto:EvilGreedyStalker@gmail.com">send me</a> the map or script, which causes the error?
It will help us determine what's wrong. The reason is we implemented one feature, which is not stable now, so you'll help us if you provide the map.
And for now you can disable autoupdate and download <a href="files/?cJass_AdicHelper_v01030410_exe.zip">older version</a> until we fix that new feature.
VD
posted at 15/09/09 20:52weaaddar
Lol sry, this is my fault. I forgot to upload new exe for autoupdater. Please press "Check for updates" again and then everything will be OK.
VD