Posted By: nigel
ENTITY* problem - 01/20/10 00:22
Hi, I'm attempting to have an onscreen model attached to the camera using the ENTITY* function, this is that section of code (I'm using lite C):
ENTITY* ak_onscreen =
{
type = "ak.mdl";
flags = SHOW;
view = camera;
}
But when I run the game it has the following error message:
Parameter unknown ENTITY
Parameter unknown type
Parameter unknown flags
Parameter unknown view
And then it shuts down. Please help!
Posted By: nigel
Re: ENTITY* problem - 01/20/10 02:59
no i don't, but the thing about that is when I try to put them in at the top of my project it has the following error message:
Script error - invalid .C code in .WDl script
any ideas?
Posted By: GorNaKosh
Re: ENTITY* problem - 01/20/10 05:49
You have to save your code-files with the ending .c for using liteC code!
Posted By: EvilSOB
Re: ENTITY* problem - 01/20/10 07:22
Easy mistake to make... AFAIK Sed still saves with a default of WDL.
Put the includes in (at the very top always)
Save the script with the file/saveas as an *.c file
(NEVER named 'unnammed' or weird stuff happens)
Be sure to manually delete the old WDL file or it will interfere
at compile time, even if it isnt open in SED.
Posted By: nigel
Re: ENTITY* problem - 01/20/10 23:50
thanks so much everyone! but now there's one problem with the code that wasn't there before i changed it to .c, now when i compile it has a problem with my player's movement vector:
syntax error:
<var move_vec[3] = 0,0,0;>
any ideas?
Posted By: rojart
Re: ENTITY* problem - 01/21/10 00:00
try this:
var move_vec[3] = {0,0,0};
Posted By: nigel
Re: ENTITY* problem - 01/21/10 00:53
that worked, thanks! there were a couple of other bugs like that which were easy to fix, probably because of the switch from .wdl to .c. but there's one glitch that i have no idea, when i try to run the script it says:
error in 'C:/program files/gstudio7/include/default.c' line 191: syntax error: can't convert GETP VALUE: FIXED::FIXED.
<var mode = video_mode;>
in my script in the variables at the top of the code right after the includes i have:
var video_screen = 1;
var video_mode = 9;
var video_depth = 16;
any ideas?
Posted By: nigel
Re: ENTITY* problem - 01/21/10 00:57
i figured it out, the video settings had to be in function_main. thanks everyone for all your help!