|
|
#1411 | |
|
In Flames
Join Date: Jan 2006
Posts: 1,153
|
Got some issues with extended structs / interfaces ...
__________________ JASS:Calling RunTest should display: Quote:
but it only displays the "1" (i am using 0.9.F.5) The print method isnt called for B-instances allocated trough A.allocate2... dunno why EDIT: Can it be that a A.allocate2 doesnt "create" a instance of type B ..but only an instance of type A .... That would suck ...i want to have the possibility to have more than one allocator ..for type B Last edited by akolyt0r : 03-04-2009 at 05:16 PM. |
|
|
|
|
| Sponsored Links - Login to hide this ad! |
|
|
|
|
#1412 | |
|
Free Software Terrorist
Technical Director
|
Quote:
|
|
|
|
|
|
|
#1413 |
|
User
Join Date: Jan 2007
Posts: 80
|
Hey, i think i found a bug.
__________________You cannt declare custom static operators. JASS:struct test private static integer A static method operator a takes nothing returns integer return .A endmethod endstruct error: Operator < cannot be static. Ofcourse you could just use public static readonly integer A but for more complex things you have to use setters and getters. Last edited by Skater : 03-08-2009 at 12:23 PM. |
|
|
|
|
|
#1414 |
|
Free Software Terrorist
Technical Director
|
Not a bug just a limitation, I guess I'll have to add them.
__________________ |
|
|
|
|
|
#1415 | |
|
Banned
Join Date: Oct 2006
Posts: 858
![]() ![]()
|
Quote:
This is from the keyword section of the JassHelper manual. Sorry, I didn't really understand what this meant but I'm going to take a shot at it and hope I get it right. So basically, the keyword functions in vJass by telling the pre-compiler that you are "about" to declare something though it was unable to be declared where you wanted it. I also have another question regarding array parameters after a struct's declaration, such as struct someStruct [9000]. I read what this compiled into and what I got from it was that it just enabled you to use more instances of the struct than the default 8190. The same would apply to adding those parameters to a global array declaration. Is this correct? Last edited by xombie : 03-10-2009 at 06:36 AM. |
|
|
|
|
|
|
#1416 | |
|
In Flames
Join Date: Jan 2006
Posts: 1,153
|
Quote:
Correct, however it will also decrease speed ...because it will add an if-condition to every operation with struct-member-variables... |
|
|
|
|
|
|
#1417 |
|
Banned
Join Date: Oct 2006
Posts: 858
![]() ![]()
|
Yea, I figured that much. Well its always nice to know.
|
|
|
|
|
|
#1418 | |
|
User
Join Date: Nov 2007
Posts: 129
![]()
|
Quote:
Here you are, I finally could recreate the private keyword bug: Code:
library A
private keyword PRIV
struct B
integer PRIV
endstruct
struct D
integer PRIV
method setPriv takes nothing returns nothing
set .PRIV = 0
endmethod
endstruct
endlibrarygives the error PRIV is no member of D, even though both structs are in the library that declares PRIV as a private keyword. |
|
|
|
|
|
|
#1419 |
|
Free Software Terrorist
Technical Director
|
try with this.PRIV
__________________ |
|
|
|
|
|
#1420 | |
|
User
Join Date: Nov 2007
Posts: 129
![]()
|
Quote:
|
|
|
|
|
|
|
#1421 |
|
Free Software Terrorist
Technical Director
|
yes. But try it.
__________________ |
|
|
|
|
|
#1422 | |
|
User
Join Date: Nov 2007
Posts: 129
![]()
|
Quote:
|
|
|
|
|
|
|
#1423 |
|
Free Software Terrorist
Technical Director
|
If I add friend it would still break here. This is a bug with the replacing stuff. It is ignoring the keywords after a single .
__________________ |
|
|
|
|
|
#1424 | |
|
User
Join Date: Nov 2007
Posts: 129
![]()
|
Quote:
Well then add friend and fix this and you get tons of ![]() |
|
|
|
|
|
|
#1425 |
|
In Flames
Join Date: Jan 2006
Posts: 1,153
|
JASS:globals debug private real BLAH debug real BLOH endglobals "undefined type private"... BLOH works ... Last edited by akolyt0r : 03-12-2009 at 07:01 PM. |
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
|
|
Donate |