nameouschangey / Stormworks_VSCodeExtension

VSCode Extension providing some better build processing for Stormworks
29 stars 8 forks source link

Stormworks VScode simulator not working #12

Closed Shorkerrr closed 2 years ago

Shorkerrr commented 2 years ago

VSC Stormworks - kopia.zip

ive replaced the code in the MyMicrocontroller.lua file for a map of the stormworks world

Shorkerrr commented 2 years ago

VSC Stormworks - kopia2.zip

standard microcontroller that comes with the addon. simulator doesnt work for me

nameouschangey commented 2 years ago

Thanks for raising this, I'll look into it and hopefully have a fix in the next update (aiming to push a lot of changes end of the weekend)

Shorkerrr commented 2 years ago

bild bild

these are some images of me adding another lua script adding the basic onTick() and onDraw() functions and then trying to use the simulator with them.

Shorkerrr commented 2 years ago

bild

and one last image. hope this helps with troubleshooting!

Shorkerrr commented 2 years ago

Sounds Good !

Skickades från E-posthttps://go.microsoft.com/fwlink/?LinkId=550986 för Windows

Från: Gordon @.> Skickat: den 9 december 2021 20:14 Till: @.> Kopia: @.>; @.> Ämne: Re: [nameouschangey/STORMWORKS_VSCodeExtension] Stormworks VScode simulator not working (Issue #12)

Thanks for raising this, I'll look into it and hopefully have a fix in the next update (aiming to push a lot of changes end of the weekend)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/nameouschangey/STORMWORKS_VSCodeExtension/issues/12#issuecomment-990145695, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AW3QOK2BVQDY55SW4RE4VPDUQD5XPANCNFSM5JXH4MDQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

nameouschangey commented 2 years ago

Thanks for the images and information.

For the first ones, where you provided the project files - if I run these, I get the output I'd expect:

Kopia: image

Kopia 2: image

Can you explain what goes wrong with these/show any images of what errors etc. you get? (Just for the Kopia and Kopia2 projects you uploaded to me - we'll solve the others afterwards)

nameouschangey commented 2 years ago

Just while you get those images, here's the solutions for the others:

image

This one, is fortunately just a typo in your Lua script. The functions should be function onTick() and function onDraw(), but you've got a full-stop there . which doesn't work for Lua: function.onTick() and function.onDraw() (the error Lua gives is a bit unhelpful there)

image

This one similarly looks like there's a typo somewhere, possibly will be fixed by fixing the above one. But it may be a mismatched bracket. e.g. if ((a=2) then end will give you that "mismatched" error, because there's one too many brackets. Annoyingly when lua catches these, it finds it hard to tell where it happened, so the easiest way tends to be to look for the highest-up line in your file that doesn't have a red squiggly line, and start searching around there.

Hope that helps with those couple. Will try to help sort the map/simulator issue you posted first when you're able to get some screenshots of it. Thanks!

nameouschangey commented 2 years ago

Closing as the remaining issue is opened in another ticket.