Heathenlamb
Member
Hey guys ... need your infinite wisdom once again. I am getting this error when I install the project on another pc.
"Trying to index variable that is not an array ... alarm 0 line 4"
So it only throws this error when I install it on another pc other than the one I am developing on. If I run it on my dev PC it runs fine without an issue. Here is the code -
CREATE -
ALARM 0 -
So it reads the mp4 content from a folder and puts the file names in an array, then uses that array to create a dynamic loopable playlist. As I said, it runs perfectly on the pc I use to develop the project. But when I install it on another pc I keep getting that error. I understand the nature of what it is saying but after staring at the code for days I simply can not work out what the hell is wrong. It is compiled with YYC.
Any help or advice would be greatly appreciated.
"Trying to index variable that is not an array ... alarm 0 line 4"
So it only throws this error when I install it on another pc other than the one I am developing on. If I run it on my dev PC it runs fine without an issue. Here is the code -
CREATE -
Code:
next = 0;
vidpath = "C:\content/";
count = 0;
var i = 0;
fileName = file_find_first_ns(vidpath+"*.mp4");
while(fileName != "")
{
fArray[i] = fileName;
fileName = file_find_next_ns();
i += 1;
}
file_find_close_ns();
vidcount = array_length_1d(fArray);
result_init = video_init( window_device() );
alarm_set(0, 1);
ALARM 0 -
Code:
application_surface_enable( false );
room_speed = 60;
nextvideo = fArray[next]
vidselect = vidpath + nextvideo
result_load = video_load(vidselect);
result_draw = 0;
result_time = 0;
result_duration = 0;
video_surface = 0;
video_set_loop(false);
video_play()
count = count + 1;
alarm_set(2, 10);
Any help or advice would be greatly appreciated.
Last edited: