Thats the thing. All of my scripts work perfectly. This isn't my first mission I made with .sfq files.
I recently started to use this type of coding methods. I call it Global functions...
hint "file lproccesed";
Link_RandomNum =
{
_max = _this select 0;
_min = _this select 1;
while {player alive} do
{
sleep 1; // this is usually where I get my errors
_num = (_min + (random _max));
hint format ["%1",_num];
};
while {!(alive player)} do
{
sleep 1; // this is usually where I get my errors
};
[_max,_min] call Link_RandomNum;
};
This script is called like this:
[] execVM "file.sqf"; // first procces the file
sleep 1;
[10,2] call Link_RandomNum; // call a script in the file