Deleted member 219079
D
Okay now what's wrong with this??
![]()
How can I fix this
Java 8
Wurst now requires Java 8. Download it here.
Language changes
Tools
- operator overloading is now enabled for strings
- @compiletime annotation is now allowed on static methods
- new pseudo-native: callFunctionsWithAnnotation (check the hotdoc in MagicFunctions.wurst for documentation)
Bugfixes:
- Added a warning for stupid assignments like this.x = x
- Improved dataflow anomaly checker, gives warnings when a value is not used
- Experimental compilation server for Wurstpack to make compiles faster (not documented yet and hard to use)
- Eclipse can now do code-folding on imports
- Improved error markers in eclipse
- Autocomplete no longer triggers inside of comments or strings
- fixed #216: Stdlib: ItemDefinition from UnitObjEditing.wurst creates units instead of items.
- also fixed some bugs regarding object editing in the standard lib
- fixed #277: Packages can import themselves, resulting in compiler bug
- fixed #278: Unicode support
- fixed #285: Multiline strings give no parse error
- fixed #296: Underscore crashes Wc3
- fixed a bug in jmpq library
- fixed a bug in the translation of closures
- hopefully fixed #26: Multiline comments were sometimes not highlighted correctly in eclipse
- fixed a really bad bug in the optimizer (TempMerger)
- fixed #280: extension functions with empty body were valid
- fixed bug with empty switch statements
- fixed a bug in the interpreter when handling ints/reals and overloading of natives
- fixed a problem when starting a map from eclipse on certain Windows installations
- fixed #310: cyclic class hierarchies
How to Install:
1. Download the archive here archive
2. Extract it to some location
3. Use the bat files to start the wurst components
Features:
-External Java 8 Runntime Enviroment (No Java required anymore)
-Preconfigured eclispe including all settings for a flawless experience
-134MB total archive size
-Ready to use sample workspace
-Compileserver starter
-Sample project setup
Been wondering, how do the abstract classes work? Do they use ExecuteFunc?
Because vJass uses ExecuteFunc/TriggerExecute for the "extends" stuff, which I find not efficient
How does one load up someone else's map script with this?
For some reason I am getting the below error every time I try and save. I most certainly have Java and have been using it for many years. The Eclipse plugin works fine and saves fine also. I have versions 1.7.0_55 and 1.8.0_20 of Java but I only use 1.8.0_20 (Java 8), is it possible that my earlier version is hindering the map from saving? Also is it possible to tell WurstWE.exe where to look for Java 8?
View attachment 139465
For some reason I am getting the below error every time I try and save. I most certainly have Java and have been using it for many years. The Eclipse plugin works fine and saves fine also. I have versions 1.7.0_55 and 1.8.0_20 of Java but I only use 1.8.0_20 (Java 8), is it possible that my earlier version is hindering the map from saving? Also is it possible to tell WurstWE.exe where to look for Java 8?
View attachment 139465
> You are missing the war3map.j file i guess. You need to save the map with the we to generate it.
Nah I did that, war3map.j is in place (in the 'wurst' folder) and it's a correct default map code. wurstTestMap1.w3x contains the wrong one tho.
Try to use "div" instead of "/"
div
on vectors makes no sense, because vectors work with real numbers. So the operator overloading function should also be named op_divReal
. Or just use multiplication sub = sub*(1/sub.length())
or the norm function from the standard library sub = sub.norm()
.![]()
Incorrect indentation level
Seems like a bug to me
![]()
Ugh, really, and I was trying to find a mistake in my code. (Tip: "start.x, stop.y")
![]()
Alright, this construction just does not work properly with Stack/LinkedList and is entirely not possible with ArrayList. You might wanna look into that. I even had to check stack size before iterating it, because it would just give me NPE's all over the way.
Also are you for real? No "clear" method in LinkedList/Stack?
For now I'm forced to create secondary local (sic!) collection containing elements I have to remove from main list, which is a huge drawback. And even after this, destroying elements while iterating just breaks everything.
![]()
Okay, this works with the array list (note how I had to code the loop manually, since 'for int i to size (or getSize())' just does not work properly). Destroying still messes things up.
Okay, in the end even DelayedDestroy does not seem to work.
Project is in the attachments. Try to put 'destroy spell' at the line 31, SpellControl.wurst and see the difference.
This looks really nice. Unfortunately a bit late where much vJass code does already exist. Is there any converter from vJass to Wurst or is it even possible to convert?
Alright guys, seems like I was wrong all along, tho resetting class members when creating a class instance is kinda meh. Thank you for helping me out, anyway!
Also you should not make screenshots. Just copy your code and put it into jass tags (btw, are ther wurst tags already?).
class Barade extends FatAss
if(dmdf.eta() > 1 year)
Barade.kill()
Will this has a Mac support or it's not supported for Mac?
construct(...,ThePlayer owner)
owner.addBuilding(this)
exprempty cannot be used here. A full statement is required.
static method create takes ..., ThePlayer owner
local Building b = Building.allocate()
owner.addBuilding(b)
Hiho,
I would like to use WurstScript for a map I am planning to create.
However, I just wanted to ask for a certain feature which could enhance many script optimizations.
As far as I know you currently only allocate custom-types (class instances) on the "heap" with the new operator.
But what if I only need a certain instance in a local scope?
Wouldn't it be nice to introduce the legendary C++ RAII into the language where you can create those variables on the stack and which are automatically deleted by an automated call to their destructor at the end of the scope.
One then could implement optimizations so that those instances won't be allocated with the "new"-way but are placed into JASS local variables instead because their sizes are known at compile time.
The only downside of this is that one cannot use polymorphism when allocating an instance that way, but polymorphism isn't required everywhere and this technique could speed things up in general code and the language would give the programmer more controle over the code without loss of abstraction.
Regards,
Robbepop