Getting started ;( Class def error

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: Getting started ;( Class def error

Re: Getting started ;( Class def error

by Blue Shadow » Mon Dec 11, 2017 7:26 pm

Kenny_mk wrote:i include in a decorate.txt my file #include script.txt
my script.txt is a copy paste of zscript/doomplayer.txt (or something like that) with just the name changed.
You're including ZScript code in DECORATE, which it cannot parse. Only include DECORATE code in DECORATE, and ZScript code in ZScript. So what you want to do is rename your decorate.txt file to zscript.txt.

Getting started ;( Class def error

by Kenny_mk » Mon Dec 11, 2017 5:26 pm

Hey im trying to get started on decorate/zscript

Im trying to create a default player class
i include in a decorate.txt my file #include script.txt

But my file consist of copy/paste of defaut doomplayer with name changed (reported in mapinfo)
mapinfo works as far as i have tested.

GameInfo
{
PlayerClasses = "DoomPlayer2","DoomPlayer"
}

but even if i rename my script.txt classes to DoomPlayer 2 i get :

Script error, "mod2.zip:doomplayer2.txt" line 1:
Expected '{', got 'Doomplayer2'.



my script.txt is a copy paste of zscript/doomplayer.txt (or something like that) with just the name changed.

I've tried Class DoomPlayer2: DoomPlayerr {
default{
health=75}
}

i get the same error no matter what i do

i know it's basic but i can't find what's wrong , thanks for help : x

Top