Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

winwin_create returns undefined

A topic by Emlise( formerly faxdoc ) created 64 days ago Views: 150 Replies: 12
Viewing posts 1 to 3

I've tried using the example code for how to create a winwin_window using winwin_create, but winwin_create only ever returns undefined.

Developer

Are you using the itch version or compiling it yourself, in what GameMaker version (IDE/runtime), and what’s in the Output?

I am using the itch version, for which gamemaker version I've tried an old LTS build, the newest lts build, newest beta build, latest 2022 build, 2024.8.1.171 and some other builds of gamemaker. For runtimes I've just used the defaults for those, as well as 2024.8.1.218. For output I'm not quite sure what you mean, It just returns undefined no matter what.

Developer

“Output” is the panel on the bottom of the GameMaker window where build log and errors show up.

So um quick update, when I woke up today I tried running the code again it just magically worked kinda? Tried it across different versions and it seems mostly fine. on IDE 2024.8.1.171 with runtime 2024.8.218 I get the error "Win32 function failed: HRESULT: 0x887a0001   Call: at line 386 in file \Graphics_DisplayM.cpp". Hope this helps.

Developer

A little hard to tell, does the included demo project work for you on that version?

I’ve tested it on IDE v2024.8.1.171 Runtime v2024.8.1.218 and it seems to work fine in both VM and YYC

I don't know why but it started working fine for me too, so can't help much sorry.

Developer

That’s not the best kind of mystery, but please let me know if you find a way to consistently reproduce this on a small project.

The message suggests that something fails in one of GM graphics functions, but creating a window doesn’t call any of those - only drawing to the window does.

Same here; winwin_create returns undefined. I tried to test the demo in IDE v2024.4.1.152, Runtime v2024.4.1.201. This in Output seems to be the problem. I didn’t change anything in the demo btw.

LoadLibraryW("C:\Users\lsk21\AppData\Local\GameMakerStudio2\GMS2TEMP\winwin-demo_399161E_VM\winwin_x64.dll") failed with error code 87 ("The parameter is incorrect.")

Through the google search, I’ve found that this might be the graphics driver issue. I ran the gamemaker on Windows 10 PC with ryzen5 3600 cpu and rtx 3070 ti gpu. However, reinstalling graphics driver, chipset driver, updating windows, reinstalling gamemaker to the latest version didn’t change a thing, hmm…

I figured it out using Dependency Walker. Turns out the problem was ucrtbased.dll. Thanks for the great extensions!

Developer(+1)

Your issue is different and was likely caused by me including a debug DLL (which references Microsoft Visual C++ Runtime redistributable) in the recent release. I have now uploaded 1.0.2a, have a look

It works flawlessly. Thanks for solving the issue.