UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

Undefined is not an array, string, or vector

broken avatar :(
Created 5 years ago
by Bigbeard2000
0 Members and 4 Guests are viewing this topic.
4,653 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 31 March 2015
Last active: 4 years ago
Posts
11
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
Bigbeard2000's Groups
Bigbeard2000's Contact & Social Links
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
Code Snippet
Plaintext
flag_init() // found within raw\commom_scripts\utility.gsc
is never called for some reason.  I am trying to revive an old map of mine so I am a little rusty.
Last Edit: May 13, 2019, 09:14:04 am by Bigbeard2000
This topic contains a post which is marked as the Best Answer. Click here to view it.
broken avatar :(
×
broken avatar :(
Location: alDurrës
Date Registered: 6 June 2017
Last active: 9 months ago
Posts
222
Respect
Forum Rank
Mr. Elemental
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Signature
My published cod maps:

Mansion of the Undead
Buros Der Toten
Minions by k3nt
×
klevi's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
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
Code Snippet
Plaintext
flag_init() // found within raw\commom_scripts\utility.gsc
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
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 31 March 2015
Last active: 4 years ago
Posts
11
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
Bigbeard2000's Groups
Bigbeard2000's Contact & Social Links
Try to run it without developer
 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.
broken avatar :(
×
broken avatar :(
Location: nl
Date Registered: 20 September 2013
Last active: 4 days ago
Posts
645
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
No code is bug free
Signature
My published cod maps:

Subzero
Djinncaves
Enclosed (a.k.a baconcube)
Bayern
Snowblind
Furtrelock

Black Ops Perks: https://www.ugx-mods.com/forum/scripts/55/call-of-duty-world-at-war-black-ops-perks/22180/
×
gympie6's Groups
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
gympie6's Contact & Social LinksTheRevenantSkullTeffrieTeffrieGympie5#5971
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: 
Code Snippet
Plaintext
#include common_scripts\utility;
at the top of the script?
 
broken avatar :(
×
broken avatar :(
Location: kh
Date Registered: 9 August 2013
Last active: 5 years ago
Posts
503
Respect
Forum Rank
Zombie Enslaver
Primary Group
Member
×
codmoddd1234's Groups
codmoddd1234's Contact & Social Links

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.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 31 March 2015
Last active: 4 years ago
Posts
11
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
Bigbeard2000's Groups
Bigbeard2000's Contact & Social Links
All of my scripts that use flag_wait have: 
Code Snippet
Plaintext
#include common_scripts\utility;
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.
Marked as best answer by Bigbeard2000 5 years ago
broken avatar :(
×
broken avatar :(
Location: nl
Date Registered: 20 September 2013
Last active: 4 days ago
Posts
645
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
No code is bug free
×
gympie6's Groups
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
gympie6's Contact & Social LinksTheRevenantSkullTeffrieTeffrieGympie5#5971
All of my scripts that use flag_wait have:
Code Snippet
Plaintext
#include common_scripts\utility;
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:
Code Snippet
Plaintext
maps\_zombiemode_firstroom_sealer::main();
I think that should be placed under this:
Code Snippet
Plaintext
maps\_zombiemode::main();
Code Snippet
Plaintext
/*--------------------
ZOMBIE MODE
----------------------*/
[[level.DLC3.weapons]]();
[[level.DLC3.powerUps]]();
maps\_dig_site::PreCache_dig_site();
maps\_soul_chest::PreCache_soul_chest();
thread maps\dw_fx::init();

maps\_zombiemode::main();

-->  maps\_zombiemode_firstroom_sealer::main();  <--

thread dual_wield();
thread maps\_soul_chest::main();
thread maps\_dig_site::main();
// level thread spawndogs();
maps\weapon_shop::init();
maps\nova_grenade::init();
level thread maps\berg_walking::main();
level thread Kill_trigger();
level thread shop_fx();
level thread switch_fov();
level thread easter_egg_toolbox();
level thread easter_egg_zombie_escort_trigger();
level thread easter_egg_zombie_escort_hunters();
Last Edit: May 13, 2019, 09:45:09 pm by gympie6
broken avatar :(
×
broken avatar :(
Location: kh
Date Registered: 9 August 2013
Last active: 5 years ago
Posts
503
Respect
Forum Rank
Zombie Enslaver
Primary Group
Member
×
codmoddd1234's Groups
codmoddd1234's Contact & Social Links
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.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 31 March 2015
Last active: 4 years ago
Posts
11
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
Bigbeard2000's Groups
Bigbeard2000's Contact & Social Links
I think I see the problem.
Go to maps/house.gsc and scroll down to line 122.
There you will see this:
Code Snippet
Plaintext
maps\_zombiemode_firstroom_sealer::main();
I think that should be placed under this:
Code Snippet
Plaintext
maps\_zombiemode::main();
Code Snippet
Plaintext
/*--------------------
ZOMBIE MODE
----------------------*/
[[level.DLC3.weapons]]();
[[level.DLC3.powerUps]]();
maps\_dig_site::PreCache_dig_site();
maps\_soul_chest::PreCache_soul_chest();
thread maps\dw_fx::init();

maps\_zombiemode::main();

-->  maps\_zombiemode_firstroom_sealer::main();  <--

thread dual_wield();
thread maps\_soul_chest::main();
thread maps\_dig_site::main();
// level thread spawndogs();
maps\weapon_shop::init();
maps\nova_grenade::init();
level thread maps\berg_walking::main();
level thread Kill_trigger();
level thread shop_fx();
level thread switch_fov();
level thread easter_egg_toolbox();
level thread easter_egg_zombie_escort_trigger();
level thread easter_egg_zombie_escort_hunters();
Yep that did the trick. Thank you very  much

 
Loading ...