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/10/09 17:43
Dark Dragon

i did my best to remove "function" keyword :)
xXx
<nothing *>() = code xXx
<nothing *>(ptrf) = function ptrf
<nothing *>(var, f) = code var = function f
example:
nothing test() {}
nothing test_nothing_ptr(nothing *pf) {
nothing *(pfunc, test)
//do smth with pf xD
}
nothing last_test() {
test_nothing_ptr(nothing *(test))
}
Greets!
~DD

posted at 03/10/09 16:11
Dark Dragon

k now request!
if possible i would like to detect is specific define just defined
#if DidIDefineIt != null
// this will execute, why?
//coz there is defined somewhere in the map
// why i want that?
// coz includes... i have a lot of em
// and they are all randomly included, u know i include that what i need and then
// they are randomly included :)
#endif
define DidIDefineIt
however i guess ill need to think on better idea... anyway if its not hard to add, just note that it wont hurt adding it :)
Greets!
~DD

posted at 03/10/09 13:41
Dark Dragon

k now i thought that in .2 you did not allow us to do that, but this does not work as well:
define <GetDummyFilter()> = LibMain_dummy_filter
#if GetDummyFilter() != LibMain_dummy_filter
setdef <GetDummyFilter()> = null
#endif

posted at 03/10/09 13:34
Dark Dragon

bug, says double define!
define <GetDummyFilter()> = LibMain_dummy_filter
#if GetDummyFilter() != LibMain_dummy_filter
define <GetDummyFilter()> = null
#endif
i am currently using 1.4.0.1!
Greets!
~DD

posted at 03/10/09 01:01
Dark Dragon

Hi ADOLF!
in your include file!
"cj_antibj_base.j" there is an bug! its an misstype however i just wanted to let u know :)

<call bj_useDawnDuskSounds()> = { if bj_useDawnDuskSounds { StartSound(bj_duskSound) } }

call "variable"?
just that little bug :)
anyway VD about update and TESH will u make comments not to turn green if i define them as grey?
i just want to know, i mean should i wait or if it cant be fixed ill have to live with that :(
anyway thanks for fixing the updater!
Greets!
~DD

posted at 03/10/09 00:42
Van Damm

Everything is OK now.
Please download new installer and enjoy using cJass.

posted at 02/10/09 22:17
Van Damm

Sorry. We are now having some trouble with updater, so please check in later today or tomorrow. I'll post here when the problems are fixed.

posted at 02/10/09 22:16
Mooglefrooglian

Oops, sorry to spam, but I updated with the installer on the front page.. Im at 1.4.0.1 now, but it says the updater has crashed every time I boot up WE or try to check for updates!
And I found out, the language was MASM apparently. Fix the "asm" typo in the manual please?

posted at 02/10/09 22:14
Mooglefrooglian

Great, thanks. One more thing: whenever I open WE, two dialog boxes about cJass updating pop up. 1.0.0.0 | 1.0.0.1 are one example. Is there a way tot turn this off?
Also, the latest stable version is reported as 1.0.0.1, and I have 1.0.0.0. I try "search for updates" under cJass, and it says downlloading self update, but then nothing happens. What do I do?

posted at 02/10/09 21:55
Mooglefrooglian

Minor typo in the manual, under predfined Macros (3.7)
...
I do not speak german alas, if you could please translate it into english I would be appreciative.
Also at the bottom:
Credits (7)
# asm — the best programming language. Ever.
# Hutch — he keeps masm alive.
Is "asm" the programming language or "masm"?
Other then that, excellent manual, I never understood what < and > were used in defines for. Now I do.
Thanks! That's not german, but russian. I've just forgot to translate it.
I'll now fix it.
~VD

posted at 02/10/09 21:03
Dark Dragon

Hi ADOLF!
can u explain to me version switcher stuff?
this sounds too good to be true xD
Greets!
~DD
Yeah, you think too high of us =)
Please wait some more, it will soon be added to the manual.
~VD

posted at 02/10/09 18:09
Dark Dragon

i am sure Van Damm is currenty busy and thats why i wont say anything here coz it would be to much spam!
i can just say awesome work and nice update for 1.4! however i still cant update my JNGPS to 1.3 because i must get permission from VD and ofc get thtat new TESH with GetSpellTargetX/Y... i hope that comments color will be changed as well :)
over all VD please contact me directly on hive and send me pm! i need to know if there are some rules i should follow and all that.
as well u can delete this msg here and just send me pm at hive :)
Greets and thanks for all your hard work guys :)
~DD

posted at 02/10/09 15:08
Dark Dragon

sry guys i guess message was to long, my last msg was sent to this page in some strange way, for that reason u can merge this two posts!
second thing is that VD said that u will improve (C)Optimizer!
so i got and idea!
struct test {
nothing onDestroy() {
...
}
}
nothing tttt() {
test t = test.create()
t.destroy()
}
compiled to:
struct test {
nothing cjass_onDestroy() {
....
}
}
nothing tttt() {
test t = test.create()
t.cjass_onDestroy()
t.destroy()
}
it would decrease lines by a lot, it would be much faster, it would reduce much of globals, it would decrese number of handle ids by a lot!
each onDestroy generates 3 handle-ids, globals, copies function onDestroy so it takes more RAM and increases number of lines twice more then it should!
as well slows map startup coz it has to load trigger and all that!
this are few suggestions which i guess you could implement some-day!
Best Regards!
~DD

posted at 02/10/09 15:01
Dark Dragon

ADOLF!
again this is not an bug but an un-optimization i guess i can call it like that.
for example:
if i have an local variable of type handle that points to some unit, ill remove that unit from the game at soem time... and when that happens struct from VM wont be cleared because that local handle was not nulled..
handle id wont go down.
now how did i found out that cJass causes that problem?
it just happened that i went to check how stuff is parsed in war3map.j and i spooted that bug...
TriggerAction_hook... is an function where i hook TriggerAddAction and DestroyTrigger since it was discovered that actions are not cleared correctly!
thous causes leaks, however now while checking parse script i detected that cjass declared local variable of type "triggeraction" and var name was if i remember correctly cj_var6666... or smth
whatever it set'ed that variable to trigger action which i returned. i returned global variable and cleared it laiter but cjass returned that local and ofc after return nulling that local wont work...
so this is maybe one thing which could be optimized/fixed.

second

posted at 02/10/09 14:52
Guest

Was looking all over and still can't find something like this : \.
struct O
public method hi1 takes nothing returns nothing
call printf("OMG")
endmethod

public method hi2 takes string hi returns nothing
call printf(hihi)
endmethod

define
{
<.hi> = {.hi1()}
<.hi>(i) = .hi2(i)}
/*where the spot in front of the . is a parameter. Also, this would only be applied to objects that match the type this is in*/
}
endstruct
scope Demo initializer Initialization
globals
endglobals

private function Initialization takes nothing returns nothing
local O o = O.create()
o.hi()
o.hi("OMG OMG")
//these would insert parameter of o : (.
endfunction
endscope
C'mon, please : (. It'd make me so happy.

posted at 02/10/09 04:47
Mooglefrooglian

I found a potential source of the error when the trigger cotnaining the following code is disabled, I receive no string too big errors.
library MoogleDebug
void DM (string DebugMessage)
{
call DisplayTextToPlayer(GetLocalPlayer(), 0, 0, "|cffffcc00M-Debug: " + DebugMessage + "|r)
}
function CreateTimer_Hook takes nothing returns timer
return Create ## Timer()
call DM("Timer created.")
endfunction
endlibrary
  1. your code does contain an unclosed string <span class="code">"|r)</span>
  2. your code does actions after return in <span class="code">CreateTimer_Hook</span>, which is not accessible.
~VD

posted at 02/10/09 04:18
Mooglefrooglian

http://img27.imageshack.us/img27/3440/41534037.jpg
The exact error is shown there. For some reason, I suspect the script is too big and AdiCHelper does not contain enough memory to handle it all? I don't know.

posted at 02/10/09 04:11
Mooglefrooglian

Yeah, the W3MMD library I had was NOT modified in any way, and when I put it in a blank map, it did compile fine. However, it did not compile fine in the map I was working on.

posted at 02/10/09 01:26
Dark Dragon

ups mistype: "doent" doe(s)nt

posted at 02/10/09 01:25
Dark Dragon

Hi guys!
i am not sure is this an bug or what but it doent work :)

library My
{
private trigger Trig = new trigger

define <GetThatTrigger()> = Trig
}
nothing test() {
trigger t = GetThatTrigger() // error
}

Greets!
~DD

posted at 01/10/09 20:10
Dark Dragon

k thanks for update :)
i again lost the internet :S
Greets!
~Dark Dragon

posted at 01/10/09 19:10
ADOLF

in 1.3.4.33 fixed next bugs:
  1. INSTRUCTION '****'
  2. FUNCNAME in jass style function or methods with prefix (public method etc)
  3. some specific bug with {} (from Dark Dragon cj_syntax)

posted at 01/10/09 17:58
Dark Dragon

k am glade to hear that :)
btw i got again that same bug and i dont know why: this is the code!

include "syn\\cj_syntax.j"
nothing test() {}

do note that this code must be written like that in order to get the bug, to get my include file here it is:
Greets!
~DD
Veery, veeeery strange. I did like you said and the map saved perfectly.
~VD

posted at 01/10/09 15:40
Dark Dragon

Hi again!
i have a question!
can ADOLF implement this:
class MyClass {
real x, y
public static thistype create(real x, real y){...}
}
is compiled to:
struct MyClass {
private real x, y
public static thistype create(real x, real y) {...}
}
since class is same as struct but only by default everything is privet insted of public...
as well i would really like
private: and public:
that would save a lot of time and make stuff more readable...
why more readable?
well its coz if you have a lot of private and public keywords it just looks a mess, so its good to simply see private: and this means everything now will be private, until it meets public: or end of struct/class...
i guess this will take time to implement but would really be nice and i thing classes should not be hard to implement just make that by default private is written if its not already :)
class loc {
real x, y
public nothing move(real x, real y) {}
private nothing swap() {}
nothing block() {}

}
block, members and swap are private and move is public :)
sry for so much requests and i hope some of them get implemented!
Regards!
~DD
private: and public: are already in out to-do list, so please stop spamming about them =)
And we'll think about the class thingy.
~VD

posted at 01/10/09 13:27
Dark Dragon

Hi VD and ADOLF!
its very strange, indeed. it was an bug where it said invalid library name...
library Core
{
...
}
however many strange characters appeared after that "Core" name... some squares appeared and ofc it said its invalid name but whats more it deleted some of the code so stuff did not work.
this started happening after i added that code integer =...
when i remove it, it works.
what i did then is write library_once insted of library and it started working... very strange. but best of all is that when i now write library again it compiles, in fact i guess there was some very strange bug which replaced or added some unknown characters or removed some from the code.
now after i rewrote library Core it works, so yeah i guess it will be fine now and thanks for ur help again!
Greets!
~DD

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]