Code works in Dynare but not in Dynare++

Dear Dynare Community,
I am starting to learn Dynare for a course at the moment, and I am experiencing some issues. Mostly a code that works just fine if I run it in matlab “dynare example.mod” will given the following error if I use the windows 10 command prompt dynare++ example.mod C:\Users\Username\Dropbox\...\sandbox>dynare++ example2.mod Caught Dynare exception: Parse error at example2.mod, line 6, column 25: syntax error, unexpected NAME, expecting EQUAL_SIGN

The example2.mod file contains the following code:

// Based on https://www.youtube.com/watch?v=ZH-BRQaAaBU

// %%%%%%%%%%%%%%%%%%%%%%% PREAMBLE %%%%%%%%%%%%%%%%%%%%%
var y inv k lab r w c;
predetermined_variables k;  
//now dynare knows that k_t will be determined one period ahead, that is in t-1 
varexo z;
parameters cbeta cdelta calpha ca;

// %%%%%%%%%%%%%%%%%%%%%%% PARAMETERS %%%%%%%%%%%%%%%%%%%%%

cbeta = 0.99;
cdelta = 0.25;
calpha = 0.33;
ca = 1;

// %%%%%%%%%%%%%%%%%%%%%%% MODEL BLOCK %%%%%%%%%%%%%%%%%%%%%

model;
1/c = cbeta * 1/c(+1) * (1+r(+1) - cdelta);
ca / (1-lab) = w/c;
c= w*lab + (1+ r- cdelta)*k - k(+1);
r = exp(z) * (lab/k)^(1-calpha);
w = exp(z) * (k/lab)^(calpha);
y = exp(z) * k^calpha * lab^(1-calpha);
inv = y-c;
end;

// INITIAL VALUES
// This only gives dynare a starting place, it does not describe the steady state!

initval;
k =9;
c =0.7;
lab = 0.3;
w= 2;
r=0;
z=0;
end;
steady(solve_algo=0); // there are four different solvers,... for linearized equtions dynare will always find a SS as it is 0

endval;
k =9;
c =0.7;
lab = 0.3;
w= 2;
r=0;
z=0.1;
end;
// %%%%%%%%%%%%%%%%%%%%%%% SHOCKS %%%%%%%%%%%%%%%%%%%%%

shocks;
var z;
periods 1:9;
//periods 10:20; if you want shock start in period 10 up to 20. e.g.: to test fisher!
values 0.1;
end;

simul(periods=2000);

It works just fine in matlab, but creates this weird error in dynare++. I have the dynare++.exe in the respective folder and execute it beforehand. As the command window returns an error message I assume dynare++ is running in the background. I tried it both with Matlab closed and open. Can anyone help?

I am usuing win10x64, matlab2015b, dynare 4.43

thanks in advance!!

best.
roblocks

Dynare mod-files are not 100% compatible with Dynare++. You need to do various changes. For example, the predetermined_variables command is not supported and the shocks-block must be entered differently. See the Dynare++ manual on this.
Also not that the mod-file you wrote based on the Youtube video has wrong first order conditions for the real wage and real interest rate.