Call of Duty 5: World at War => Help Desk => Mapping => Topic started by: Bigbeard2000 on May 13, 2019, 09:00:30 am
Title: Undefined is not an array, string, or vector
Post by: Bigbeard2000 on May 13, 2019, 09:00:30 am
I am getting a weird error message in my console after I build my map.
Console Text
******* script runtime error ******* undefined is not an array, string, or vector: (file 'common_scripts/utility.gsc', line 463) while( !level.flag ) * Error: called from: (file 'maps/_zombiemode_firstroom_sealer.gsc', line 92) flag_wait("all_players_connected"); * Error: called from: (file 'maps/_zombiemode_firstroom_sealer.gsc', line 7) thread sealDoors(); * Error: called from: (file 'maps/house.gsc', line 122) maps\_zombiemode_firstroom_sealer::main(); // inits first room challenge * Error: started from: (file 'maps/house.gsc', line 9) main() *
For some reason it looks like level.flag isn't initialized, but I don't know how this would be possible considered that it should be initialized within the official scripts, as opposed to my own. I assume this means that is never called for some reason. I am trying to revive an old map of mine so I am a little rusty.
Title: Re: Undefined is not an array, string, or vector
Post by: klevi on May 13, 2019, 03:49:34 pm
I am getting a weird error message in my console after I build my map.
Console Text
******* script runtime error ******* undefined is not an array, string, or vector: (file 'common_scripts/utility.gsc', line 463) while( !level.flag ) * Error: called from: (file 'maps/_zombiemode_firstroom_sealer.gsc', line 92) flag_wait("all_players_connected"); * Error: called from: (file 'maps/_zombiemode_firstroom_sealer.gsc', line 7) thread sealDoors(); * Error: called from: (file 'maps/house.gsc', line 122) maps\_zombiemode_firstroom_sealer::main(); // inits first room challenge * Error: started from: (file 'maps/house.gsc', line 9) main() *
For some reason it looks like level.flag isn't initialized, but I don't know how this would be possible considered that it should be initialized within the official scripts, as opposed to my own. I assume this means that is never called for some reason. I am trying to revive an old map of mine so I am a little rusty.
Try to run it without developer
Title: Re: Undefined is not an array, string, or vector
Post by: Bigbeard2000 on May 13, 2019, 08:59:25 pm
I have seen the same suggestion on other posts, but I don't really think that fixes that problem (more like just ignoring it). If possible I would really like to find out what is causing the problem and fixing it, so that I don't have to leave developer mode to further develop my map.
Title: Re: Undefined is not an array, string, or vector
Post by: gympie6 on May 13, 2019, 09:07:12 pm
I have seen the same suggestion on other posts, but I don't really think that fixes that problem (more like just ignoring it). If possible I would really like to find out what is causing the problem and fixing it, so that I don't have to leave developer mode to further develop my map.
From what I see the script is not recognized in maps/_zombiemode_firstroom_sealer.gsc
Have you tried to add: at the top of the script?
Title: Re: Undefined is not an array, string, or vector
Post by: codmoddd1234 on May 13, 2019, 09:20:41 pm
It shouldn't be happening on a new script placer map. // That error comes from using a command like flag_wait "all_players_connected" before flag_init "all_players_connected" If you have developer 1, developer_script 1, and logfile it should tell you the exact file and line the flag is called from.
Title: Re: Undefined is not an array, string, or vector
Post by: Bigbeard2000 on May 13, 2019, 09:29:11 pm
It shouldn't be happening on a new script placer map. // That error comes from using a command like flag_wait "all_players_connected" before flag_init "all_players_connected" If you have developer 1, developer_script 1, and logfile it should tell you the exact file and line the flag is called from.
Where would I call flag_init "all_players_connected". I would assume the system would do this because I assume that the system is the one that sets the all_players_connected flag when the game starts.
Title: Re: Undefined is not an array, string, or vector
Post by: gympie6 on May 13, 2019, 09:41:21 pm
All of my scripts that use flag_wait have: Where would I call flag_init "all_players_connected". I would assume the system would do this because I assume that the system is the one that sets the all_players_connected flag when the game starts.
I think I see the problem. Go to maps/house.gsc and scroll down to line 122. There you will see this: I think that should be placed under this:
Title: Re: Undefined is not an array, string, or vector
Post by: codmoddd1234 on May 13, 2019, 10:01:41 pm
gympie is probably correct and your calling a custom script with a flag_wait in it before the flag is defined. Moving it under zombiemode or load would ensure that the flag was defined.
Title: Re: Undefined is not an array, string, or vector
Post by: Bigbeard2000 on May 13, 2019, 10:07:15 pm