ZScript Documentation (2021 Redux!)

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: ZScript Documentation (2021 Redux!)

Re: ZScript Documentation (2021 Redux!)

by Chaosvolt » Tue Jun 28, 2022 11:58 pm

Dang, I don't see anything on how ZScript status bar stuff works in it. Would probably save a lot of people a lot of questions since that's one area that has almost no useful documentation on the wiki.

Re: ZScript Language Documentation (WIP)

by Marrub » Sat May 08, 2021 7:01 am

Yo! I've finally, after five billion years, published our new documentation! You can check it out here! The source is available here, and eventually when I feel a "stable" release is possible, a primary repository will also be published!

Additionally, I am looking for contributors, small, primary, or otherwise! If anyone wishes to help document things that are currently undocumented or marked to-do, you can open a pull request, or you can PM me here if you want to be added to the organization. CI will automatically check for errors and publish the documentation build when merged.

Re: ZScript Language Documentation (WIP)

by nicolettelemasque » Sun Jan 24, 2021 8:18 pm

Marrub wrote:Something's coming!
Yo... that looks sweet! I'm very excited for this, thank you for your continued efforts.

Re: ZScript Language Documentation (WIP)

by DyNaM1k » Wed Sep 16, 2020 12:57 pm

That's some very exciting news indeed.

Re: ZScript Language Documentation (WIP)

by Major Cooke » Tue Sep 15, 2020 9:52 pm

Now that is going to make things a ton easier to work with. :mrgreen:

Re: ZScript Language Documentation (WIP)

by Marrub » Tue Sep 15, 2020 8:44 pm

Something's coming! I'm working on a 2.0 version of the documentation, which I'll release When It's Done. The language documentation has been updated, making it easier to read and more concise. The API documentation has been expanded and made far easier to read and maintain. Additionally, it also is planned to document the supported data formats and other DSLs like MAPINFO, as well as the ACS VM and ACS language. I will hopefully be able to release this within the next few months but I can't promise anything. As usual, development updates will occasionally be posted in my Discord channel, in-between me being obsessive over music.

Re: ZScript Language Documentation (WIP)

by Marrub » Tue Jun 25, 2019 2:53 am

Josko wrote:Alright, understandable :)

But how far on is this documentation? How much " Complete " is it? :P
It depends on what you need it for. Some parts of the documentation are very complete, whereas others are quite lacking and ridden with to-do markers.

Re: ZScript Language Documentation (WIP)

by Josko » Tue Jun 25, 2019 2:50 am

Alright, understandable :)

But how far on is this documentation? How much " Complete " is it? :P

Re: ZScript Language Documentation (WIP)

by Marrub » Tue Jun 25, 2019 2:26 am

Josko wrote:So still not finished eh? You still working on it? ^^
Not at the moment, I have other projects taking priority, and lots of real-life stuff going on.

Re: ZScript Language Documentation (WIP)

by Josko » Mon Jun 24, 2019 11:59 pm

So still not finished eh? You still working on it? ^^

Re: ZScript Language Documentation (WIP)

by Marrub » Tue Feb 12, 2019 1:30 am

Major Cooke wrote:
Documentation wrote:Adds amount new empty-constructed objects at the end of the array, increasing Size and calling Grow if necessary. Value types are initialized to zero and reference types to null.
If you do a reserve on an object array in ZScript and then try null checking inside it without manual initialization, it will crash. Might be something to do with a difference between an internal null and ZScript null?

Whatever the case, it must be manually initialized or it will kill the game.
This sounds like an engine bug, which shouldn't be documented. I suggest reporting it. (If it isn't a bug, I'll add clarification.)

Re: ZScript Language Documentation (WIP)

by Major Cooke » Mon Feb 11, 2019 1:57 pm

Documentation wrote:Adds amount new empty-constructed objects at the end of the array, increasing Size and calling Grow if necessary. Value types are initialized to zero and reference types to null.
If you do a reserve on an object array in ZScript and then try null checking inside it without manual initialization, it will crash. Might be something to do with a difference between an internal null and ZScript null?

Whatever the case, it must be manually initialized or it will kill the game.

Re: ZScript Language Documentation (WIP)

by Marrub » Sat Feb 02, 2019 8:21 pm

Major Cooke wrote:Dynamic Arrays: Whenever changing the size of one, it's important to immediately initialize anything new, unless it was Push()'d. I just tested it: trying to check the new stuff after doing a Reserve crashes GZDoom. Best to record the old size and, after the array grows bigger, fill it with default values - in particular, object arrays with nulls. Otherwise GZDoom looks into an empty container and just dies.

Perhaps that should be added as a warning on the dynamic array page?
I've expanded the description to clarify how it works more exactly.

Re: ZScript Language Documentation (WIP)

by Major Cooke » Sat Feb 02, 2019 4:40 pm

Dynamic Arrays: Whenever changing the size of one, it's important to immediately initialize anything new, unless it was Push()'d. I just tested it: trying to check the new stuff after doing a Reserve crashes GZDoom. Best to record the old size and, after the array grows bigger, fill it with default values - in particular, object arrays with nulls. Otherwise GZDoom looks into an empty container and just dies.

Perhaps that should be added as a warning on the dynamic array page?

Re: ZScript Language Documentation (WIP)

by Marrub » Mon Dec 31, 2018 8:43 am

Major Cooke wrote:Masterful stuff man. This is exceptionally handy. Well done!
Thanks. If there's anything you need documented feel free to suggest or make a pull request.

Top