wurstscript / WurstScript

Programming language and toolkit to create Warcraft III Maps
https://wurstlang.org
Apache License 2.0
226 stars 28 forks source link

war3.exe FATAL ERROR! #987

Closed isaced closed 3 years ago

isaced commented 3 years ago

I use vscode to run WurstBareboneTemplate, start the game by extension "wurst: run a wurst map", build success, then game crash directly, I don't know why?

image

this is my WurstSetup version:

image

war3 1.27

thanks for help

Frotty commented 3 years ago

The master branch of the standard library uses new natives, you need to use the pre1.29 branch if you want to build for earlier wc3 versions.

isaced commented 3 years ago

@Frotty Thank you very much for your reply. I tried the pre1.29 branch to work.

However, some fatal errors are encountered in the pre1.29 branch, which will lead to compilation failure. Can I submit PR to pre1.29?

For example:

https://github.com/wurstscript/WurstStdlib2/blob/8966dd98178aa8c64a99229c68888c412eb2ff86/wurst/data/LinkedList.wurst#L108

/** Removes the element and it's entry at the given index */
function removeAt(int index) returns T
    let entry = getEntry(index)
    entry.prev.next = entry.next
    entry.next.prev = entry.prev
    destroy entry   
    size--
    return entry.elem    //  will catch null after "destroy entry" 
Frotty commented 3 years ago

However, some fatal errors are encountered in the pre1.29 branch, which will lead to compilation failure. Can I submit PR to pre1.29?

Sure, I didn't actively maintain it. The compiler error was introduced after the branch was made.