Page 1 of 1

Getting started ;( Class def error

PostPosted: Mon Dec 11, 2017 6:26 pm
by Kenny_mk
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

Re: Getting started ;( Class def error

PostPosted: Mon Dec 11, 2017 8:26 pm
by Blue Shadow
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.