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 11/10/09 23:32

I know you're not a fan about not removing comments from the war3map.j, but i've already explained why it's usefull sometimes for me.
Since you didn't answered clearly no or yes, i ask it again.
Will you leave this part of optimisation only if AdicOptimizer is enable ?

posted at 11/10/09 19:59

I'm having some issue with using defines within defines.
Here is an example map that has the problem::
If you go to the define InitList(T) found in the sometest trigger uncomment the registerType statement and note that it will crash AdicHelper. If rapidshare doesn't work I can just email you guys.
I'm having troubles downloading from rapidshare :( Can you please upload the file somewhere else or send it to my email

posted at 10/10/09 21:16

sorry.. because can work.
so i think this can work too.
Syntax error on such cases was added in recent version.

posted at 10/10/09 20:55

can't Work in
#if xxx
#define {
yyy = zzz
Please, read manual carefully. <span class="code">#define</span> cannot be used inside of conditional compilation blocks, <span class="code">#setdef</span> can be.

posted at 09/10/09 20:52

cJASS 100% does not work with zinc : (
New version ( 100% works with zinc. It just ignores zinc.

posted at 08/10/09 23:59
Dark Dragon

i see!
k i actually fixed that!
define <call ...>
will work! but maybe if possible ADOLF can make that defines compile if they are called by call :)
anyway np i know how to fix that now but it would be nice if ADOLF can implement call MyDefine()!

posted at 08/10/09 18:06

Any cJass way for defaults in interfaces?
private interface MyInterface
method someMethod takes nothing returns nothing defaults nothing

posted at 08/10/09 16:22

Bug! : O
else {
set i =
If I get rid of the set, it suddenly freaks O_o, no idea why. Putting the set in there or putting it on the next line or something else fixes, but yea, o-o. weird
else {
i =
Please provide slightly more code so I can see the context =)

posted at 08/10/09 01:53
Dark Dragon

i was hooking one of blizzard funcs!
and this line made the cjass not to compile any of code...
define NewSoundEnvironment(file) = { ClearMapMusic(); NewSoundEnvironment(file) }
could u please fix that :)
Damn, I should really write that in manual in capital letters! However, it's written there in the section where function hooking is explained. If you <a href="manual-en#htoc22">read it</a>, you'll find an answer to your question.
And ADOLF should really add some error reporting on this case :/

posted at 07/10/09 20:46

Please redownload the updater and replace the old one
Ok, it works
But you didn't update the changelog, what changes in the new version, "only" some bug fix ?
For now, local changelog isn't changed by autoupdater. That will be added in future versions.

posted at 07/10/09 20:37

Can't Work:
#define Test (Name) = {
library Name
#include "cj_types_priv.j"
void ABC () {
You cannot use #include instruction in #define block.

posted at 07/10/09 20:31

Nvm, DisplayTextFromPlayer is hella slow, I just benchmarked it o-o
Who care, really ?
I will still use it because its friendly user and don't break replays.
I've a bug with AHupdate.exe , it always try to download a new version and i've to close it with the task manager.
And if fact i don't get the new version with it.
Please <a href="files/?AHupdate.exe">redownload the updater</a> and replace the old one

posted at 07/10/09 11:22

Nvm, DisplayTextFromPlayer is hella slow, I just benchmarked it o-o

posted at 07/10/09 11:13

for printf, rather than using DisplayTextToPlayer(GetLocalPlayer()..), you could use-
player GLOBAL_PLAYER = Player(15)
DisplayTimedTextFromPlayer(GLOBAL_PLAYER, 0, 0, 100, "hi")
That auto displays text to all players... : P
It's not widely known. It also displays text to the player it's from ^_^. I believe it broadcasts text out to every given player in the game, including the origin player. It'd be like GetLocalPlayer() but wouldn't corrupt replays and should be faster =).
I haven't benchmarked it, but you should ^_^

posted at 07/10/09 08:06

Congrats on going public.The manual is nice, but you should put a link to it on the front page :).

posted at 07/10/09 04:14

Slight bug in the new TESH.
private constant string ESCAPED_CHARS = " \\"
This highlights everything after it blue, as if it were a string. cJass compiles fine, but TESH highlights it wrong.

posted at 07/10/09 02:59

struct Hi {}
struct Oh : Hi {}
One liner control structures-
if true printf("hi")
do printf("hello") whilenot ++x > 100
Collections (2 lines of extra code in the map)
collection x
x[x.size++] = 1 //push, 2 lines
value = x[x.size--] //pop, 2 lines
value = x[3] //array implementation
value = x.delete(3) //removal, auto index, and return the removed value, 2 lines
I made a very tiny utility that does this... and it's literally 2 lines of code in the map for all of these features-
integer index
type array collection
And that is it. Everything else is something of a definition. Auto indexed arrays would be extremely nice. Reason they are collections and not stacks is the order isn't maintained ><.
Here is my implementation:

private static integer size = -1
private static $type$ array data

public static method last takes nothing returns integer
return thistype.size

public static method add takes nothing returns nothing
set thistype.size = thistype.size + 1

public static method remove takes nothing returns nothing
set thistype.size = thistype.size - 1

public static method operator []= takes integer index, $type$ value returns nothing
set[index] = value

public static method operator [] takes integer index returns $type$

public static method push takes $type$ value returns nothing
set[thistype.size] = value

public static method pop takes nothing returns $type$

public static method index takes integer slot returns nothing
set[slot] =[thistype.size]

It's put into a struct that extends an array, meaning everything is removed and all of the methods are inlined. The optimizer is screwy (vex did it on purpose) and won't remove all inlined methods.. : |... I can't make a cJASS version on definitions because it'd still work off of inlined methods, which wouldn't get removed by vexorian's vJASS or optimizer >< (no apparent reason).
Soo... : D
Also, I brought this up with Vexorian too-
Make an inline keyword that automatically inlines the contents of a method or function.
Of course, answer again was no, which makes 0 sense =P. If I have a 2 line method and I want to inline it, Vexorian is pretty much saying, too bad, my language, don't like it, make your own.
So yea : D, fixing up stuff Vexorian refuses to address like those issues would be a major plus ^_^.
Oh yes, and sealed structs and protected members would be fun. Sometimes I have private members in a module to prevent collision (proper OOP) when people use them and what not (no need to show them), but then I can't use them in other add-on modules because they are private ><. I really need a protected thing and bad, =).
Again, great work guys, check out this almost unreadable code I wrote-
scope MyScope initializer MyFirstLoop {
void MyFirstLoop() {
int array myArray; int max = GetRandomInt(1, 100), iterator = max
do {myArray[iterator] = iterator * 10} whilenot --iterator == 0
max = 0; iterator = 1
do {printf(I2S(myArray[iterator]))} whilenot myArray[++iterator] == 0
gg : D

posted at 07/10/09 00:47

I hadn't understood this part, now it's clear :)

posted at 06/10/09 19:43

So in other words, is it possible , and how exactly, or would you add this feature ?
I've deleted your post cause it's too huge.
You cannot directly use same name for define and for its contents as it will cause recursive replace. But you can do it by using concatenation operator <span class="code">##</span>. In your case you should do the following:
<div class="code">#define private CreateTimer = Create##Timer
#define private DestroyTimer = Destroy##Timer</div>And you're done!

posted at 06/10/09 09:31

int[] who
int array who
Oh yea, sry for this double feedback thing, but can't really edit ^_^
int[12] who
int array who[12]
Tx, lol. Yea : D. Was surprised that wasn't in cJASS actually o-o.
int[12,12] who
int array who[12][12]
Yeah, this thing is obvious and it's already in our to-do list.
Not completely as you suggest, rather like <span class="code">int who[]</span> or <span class="code">int who[12]</span>

posted at 03/10/09 23:19
Dark Dragon

Yeah thanks!
i did use the #guard
however problem is that i need to init specific variables before anything is called, infact i have to hook InitBlizzard but i need to know if in specific level i do need to init that variable, basically is smth included... or simply is specific define defined anywhere in the map :)
Greets and thanks!

posted at 03/10/09 23:12

@Dark Dragon
About #if DidIDefineIt != null ...
#guard construction is enough to protect you from multiple including the same file.

posted at 03/10/09 22:56
Dark Dragon

yes i do know it does not work but i would like that it works... anyway its not top priority!
ill send u an pm at hive VD!

posted at 03/10/09 21:57

"bug, says double define!
define <GetDummyFilter()> = LibMain_dummy_filter
#if GetDummyFilter() != LibMain_dummy_filter
define <GetDummyFilter()> = null
i am currently using!
Read the manual. It is included so you don't have to spam these feedback sections. It says you must use setdef, or it will error. Somewhere around 3.7 in the manual.
Please, read the documentation carefully.
<a href="">Here</a> in the second paragraph:
"In such conditional blocks you can write any code with one limitation: they shouldn’t contain identical define declarations: "
Please read it, the way of doing it is described there.
In the future, parser will give errors if you try to use #define in conditional blocks
Parser do 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]