Can someone check this code [syntax error][solved]

Posted By: peteredlin

Can someone check this code [syntax error][solved] - 08/06/12 16:50

Hello,
I work on a project with multiple files. But when i try to run the main scripts i get an syntax error in a included script.
Header file:
Code:
STRING* ChasisModel = "";
ENTITY* Chasis;
VECTOR* ChasisPosition;



Scripit file (used for configuration):
Code:
ChasisModel = "Chasis.mdl";


//Wheeled section
axles = 3

//first axle
Wheels[1] = "FrontWheel.mdl";
WheelParrent[1] = chasis;

//second axle
Wheels[2] = "RearWheel.mdl";
WheelParrent[2] = chasis;

//third axle
Wheels[3] = "RearWheel.mdl";
WheelParrent[3] = chasis;


Posted By: MasterQ32

Re: Can someone check this code [syntax error] - 08/06/12 16:56

i hope your config file isn't just that
you have to alter the variables in a function, so just wrap a function around the whole config file

this should work, but mind that you shouldn't define any functions in the config.c and also all variables declared there are local!
Code:
function config_mygame()
{
#include "config.c"
}


Posted By: peteredlin

Re: Can someone check this code [syntax error] - 08/06/12 17:12

Thx for the quick help, but i found the problem allready..
It was a forgotten ";" in a previous included script.
Delete this post pls.
© 2023 lite-C Forums