ZScript in Decorate not working

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!
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 Reply
Kzer-Za
Posts: 522
Joined: Sat Aug 19, 2017 11:52 pm
Graphics Processor: nVidia (Modern GZDoom)

ZScript in Decorate not working

Post by Kzer-Za »

I'm trying to define a custom missile just like in this manual with BeastBall example, but with my "Class TestFBall : ACTOR" I'm getting an error:
Script error, ":decorate.testfball" line 1:
Expected '{', got 'TestFBall'.
My description is in a separate file "DECORATE.testfball", the syntax seems to be followed, but ZDoom doesn't even get to parsing the code! Has synax changed and now you have to have everything followed "Class" in curly brackets, or what?
User avatar
Enjay
 
 
Posts: 27332
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: ZScript in Decorate not working

Post by Enjay »

Sorry, I'm confused by your post. Are you loading this in a lump called DECORATE.testfball? If so, GZDoom is probably trying to load is as DECORATE code rather than ZScript code (call your file zscript.something).
Kzer-Za
Posts: 522
Joined: Sat Aug 19, 2017 11:52 pm
Graphics Processor: nVidia (Modern GZDoom)

Re: ZScript in Decorate not working

Post by Kzer-Za »

Oops! From this https://zdoom.org/wiki/Converting_DECOR ... to_ZScript I somehow got the impression that you could kinda embed sripts right in DECORATE files :) My bad. Just renamed the file into zscript.testfball and it's working now :)
Post Reply

Return to “Scripting”