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 03/09/11 17:32
Guest

You should really drop off JASS2's block syntax and make everything with curly brackets. It's just better that way. You should also change the syntax of interfaces and function pointers to a more C-like one.

posted at 26/08/11 20:52
Guest

Please update the dev version with the newest one, I think it's good enough to be considered "dev".
For people who don't check feedback page...

posted at 24/08/11 10:57
ADOLF

Project died again? :(
No, I'm working)

posted at 24/08/11 09:18
Guest

Project died again? :(

posted at 22/08/11 13:12
Guest

""Betas run's JassHelper to preparser textmacroses. So try to copy SFmpq.dll (take it in jassnewgenpack*\AdicHelper\) to:
jassnewgenpack*\bin\
jassnewgenpack*\jasshelper\
jassnewgenpack*\jasshelper\bin\""
Thanks a lot, Adolf! It works now :D
You should mention this somewhere, in case someone else runs in the same problem. Or the installer should replace those.

posted at 21/08/11 10:01
ADOLF

Why do i, once i update wehack.lua, keep geting error message when i save map: "SFmpq.dll missing"? :/
Before i changed wehack.lua, it didn't happen.
Betas run's JassHelper to preparser textmacroses. So try to copy SFmpq.dll (take it in jassnewgenpack*\AdicHelper\) to:
jassnewgenpack*\bin\
jassnewgenpack*\jasshelper\
jassnewgenpack*\jasshelper\bin\

posted at 20/08/11 23:46
Guest

Why do i, once i update wehack.lua, keep geting error message when i save map: "SFmpq.dll missing"? :/
Before i changed wehack.lua, it didn't happen.

posted at 19/08/11 21:17
ADOLF

2 Troll-Brain :
code.google.com/p/cjass/issues/detail?id=15 <- I'll add this feature to optimizer latter)
2 Anonymus :
Hmm, maybe I know how fix it. cJass just add some lib wit this function:
_sGroupCopyCode		db	"library cjGroupCopyLib75hJKJ3745gf", 0dh, 0ah
			db	"globals", 0dh, 0ah
			db	"group cj_tmpgr_copy_nw509ert7", 0dh, 0ah
			db	"endglobals", 0dh, 0ah
			db	"function cj_group_copy_75hJKJ3745gf takes nothing returns nothing", 0dh, 0ah
			db	"//# optional", 0dh, 0ah
			db	"call GroupAddUnit(cj_tmpgr_copy_nw509ert7,GetEnumUnit())", 0dh, 0ah
			db	"endfunction", 0dh ,0ah
			db	"endlibrary", 0dh, 0ah
I try to add to all user defined libraries rewuires cjGroupCopy***

posted at 19/08/11 17:34
Guest

Here's the code which causes error with for loop
unit GroupPickNearestUnitToLoc(group g, location loc) {
        real dist_min = 0
        unit nearest_unit = null
        // /*
        for(unit u; UnitsInGroup(g))
        {
            location loc_unit = GetUnitLoc(u)
            real dist = DistanceBetweenPoints(loc_unit, loc)
            
            if dist_min == 0 || dist_min > dist
                dist_min = dist
                nearest_unit = u
            endif
        }
        // */
        return nearest_unit
    }
However, if I use it in an empty map, it compiles correctly. So it's "endemic" to my map?? I can provide any other details if you need.
Compiled code
function GroupPickNearestUnitToLoc takes group g,location loc returns unit
local real dist_min=0
local unit nearest_unit=null
local unit cjlocgn_00000000
local location cjlocgn_00000001
local real cjlocgn_00000002
set cj_tmpgr_copy_nw509ert7=cjgrfgn_00000001
call GroupClear(cj_tmpgr_copy_nw509ert7)
call ForGroup(g, function cj_group_copy_75hJKJ3745gf)
loop
set cjlocgn_00000000=FirstOfGroup(cjgrfgn_00000001)
exitwhen cjlocgn_00000000 == null
call GroupRemoveUnit(cjgrfgn_00000001, cjlocgn_00000000)
set cjlocgn_00000001=GetUnitLoc(cjlocgn_00000000)
set cjlocgn_00000002=DistanceBetweenPoints(cjlocgn_00000001, loc)
if dist_min == 0 or dist_min > cjlocgn_00000002 then
set dist_min=cjlocgn_00000002
set nearest_unit=cjlocgn_00000000
endif
endloop
set cj_v666_unit=nearest_unit
set cjlocgn_00000001=null
set nearest_unit=null
return cj_v666_unit
endfunction

posted at 19/08/11 13:31
Troll-Brain

I'm making benchmarks :
Because variable name length really does matter, i would need the shortest ones.
It would be great if i could use #for with the "special" "base" 63 (a-Z ; 0-9 , _ ) instead of the decimal base.
The first character has to be a letter and the last mustn't be an _ , and ofc if the generated word is only one character it has to be a letter.
The first benchmark is failed because of that, a good script optimizer should rename locals with one letter (hell 52 seems enough for the whole functions) and rename globals and functions with as short characters as possible (even one if it's possible).
But if you consider it way too specific or don't want to do it, just tell me, i will make a personal external script for that.
Alternatively you could also improve the optimizer but i think you have enough work with fixing bugs and features adding ^^
Keep the good work.

posted at 19/08/11 11:39
ADOLF

.37 is still bugged with for loop :(
Post anywhere map or code - I need to see it)

posted at 18/08/11 21:08
Guest

.37 is still bugged with for loop :(
I receive error from jasshelper
Undefined function bla-bla-bla
call ForGroup(g, function cj_group_copy_75hJKJ3745gf)

posted at 17/08/11 17:46
ADOLF

while (cond) whilenot not(cond),
Try to commeny this line. Last betas are incompatible with the libraries types and printf; We'll update it later.

posted at 17/08/11 15:12
Guest

That's from the newest version (.37 I think).
Something with { symbol.

posted at 17/08/11 15:08
Guest

There's a problem with "types" library.
Error log
[8] Critical error: bad char
define
{ 
int integer
bool boolean
void nothing
float real
while (cond) whilenot not(cond),
break=exitwhen true

enddefine

posted at 17/08/11 10:12
ADOLF

2 Troll-Brain :
Hi!
But it seems there is no bug if you use (), like
Hmm, I do not remember exactly why it is so=/ Use () yet.
For some odd reason there is also a problem with the 2898 declaration
It's buffer overflow bug:
// ~ transladet to c asm
char ParsedLocalsCode [0x00010000]
char ParsedFuncCode   [0x000a0000]
I'll increase this buffers in the next beta (.37)

posted at 17/08/11 01:57
Troll-Brain

There is definetely something wrong with conditonnal compilation and the value "1", i've made several tests, and bugs seems to happen only with this value (well at least seems to be fine with 0 and 2).
The nature of the bugs depends of the relative position of the comparaison to 1 (the first condition, the first elseif, the last elseif ...) in the conditionnal block structure.
But it seems there is no bug if you use (), like
# if ( MyValue == 1 )
This time i made the tests with the last beta 1.4.2.36

posted at 16/08/11 03:21
Troll-Brain

Btw i have installed with the cjass installer and i'm using the 1.4.2.14 version of AdicHelper

posted at 16/08/11 03:18
Troll-Brain

Hello.
Bugs report.
Conditional compilation is broken when you use integers (booleans seems to work)
library Benchmark initializer init {

    #define private TEST_TO_DO = 2  // 1 for locals test and 2 for globals test
    #define private PERIOD = 0.01 // depends your hardware configuration, if it lags to much try an higher value, if there is not enough fps drop try a lower one

    globals
        #for i (1,10000)
            integer J##i
        #endfor
    endglobals
            
    private nothing Test() {
    
        #if TEST_TO_DO == 1
            
            #for i (1,10000)
                local integer j##i = 1
            #endfor
            
        #elseif TEST_TO_DO == 2
        
            #for i (1,10000)
                J##i = 1
            #endfor
            
        #else
        
            PauseTimer(GetExpiredTimer()) ; DisplayTextToPlayer(GetLocalPlayer(),0,0,"invalid TEST_TO_DO")
            
            
        #endif
        
        debug DisplayTextToPlayer(GetLocalPlayer(),0,0,"limit op not reached")
        
    }
    
    private nothing init() {
        TimerStart(CreateTimer(),PERIOD,true,function Test)
    }
    
}
Whatever TEST_TO_DO value, it always consider it as == 1 (or maybe it considers only the first if condition, can't test it yet).
For some odd reason there is also a problem with the 2898 declaration :
local integer j2897=1
local intege

898=1
local integer j2899=1
As you can see it splits, i'm sure it's not jasshelper fault because i've checked the parsed_war3map.j of the subfolder AdicHelper (i'm using the JNGP).
And the bug comes with this script (the local definition) but not with the second one (the global setting)
Btw i had to edit the function compilemap_path of wehack.lua to get it work.
		cmdline = cmdline .. " jasshelper\\common.j jasshelper\\blizzard.j AdicHelper\\parsed_war3map.j \"" .. mappath .."\""
I asked jasshelper to parse the external file that was built by adichelper, because else the input file was the script as it was (i mean without Adichelper preprocessing)

posted at 12/08/11 12:05
ADOLF

Maybe you should just rewrite cjass in c
It's too long.
It'd be a hell of a lot easier to debug : P
No, debugging in ASM is awesome.
Also many bugs - classical bugs (buffer overflow) of low level languages (like C, where coder may use pointers)...

posted at 12/08/11 08:58
nestharus

lol..
Aren't you happy I have these huge system libraries and tons of resources?
cjass will work when I can save my massive system library with cjass enabled and all of the systems enabled and not have a crash ; P.
I'm just going through the libs in it and finding these bugs for you ; ).

posted at 12/08/11 07:58
Guest

Maybe you should just rewrite cjass in c
It'd be a hell of a lot easier to debug : P

posted at 11/08/11 11:17
nestharus

submitted the issues on Google Code so that they can be tracked more easily : ).

posted at 11/08/11 10:42
ADOLF

Beta tester notes

posted at 11/08/11 02:28
Frotty

Nestharus is right
//! textmacro a
//! endtextmacro
Still does crash, maybe i had an empty line after it.

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]