Hello All.
I have a problem with local variables, it appears. I encountered it while programming a level, and have narrowed the problem to the following very small piece of code. This is my script (in lite-C):
----------------------------------------------
///////////////////////////////
#include <acknex.h>
#include <default.c>
///////////////////////////////
function main()
{
video_switch(7,0,1);
wait(3);
level_load("probleme2.WMB");
wait(2);
}
action a_object()
{
VECTOR* distance = {x=0;y=0;z=0;}
}
-------------------------------------------------
Whenever I attach this script to a level (even if it does not contain an entity), and I press "tab" to see the console, the message "Error 1513: Crash in def_console" appears instead. And if I add other pieces of code afterwards, then it does funny stuff or does not work at all.
Does anybody have a clue what is wrong here? I'm sure it's very obvious, but I have no clue what it is is. Aren't we allowed to define vectors as local variables?
Thanks a lot for any help.
Thomas
PS: I am using A7.5 Pro running on Athlon dual core, WinXP Pro, and 1 Gig of RAM.