Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 71 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty 2
Category: CoD2 Scripting
Scripting and coding with Call of Duty 2.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Cannot cast undefined to string.
Moczulak
General Member
Since: Mar 30, 2009
Posts: 77
Last: Apr 8, 2013
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Tuesday, Apr. 17, 2012 08:24 pm
I have this error:

Code:
******* script runtime error *******
cannot cast undefined to string: (file 'files/zom.gsc', line 1770)
self setWeaponSlotWeapon("primary", self.pers["weapon"]);
*
called from:
(file 'files/zom.gsc', line 1737)
self GiveWeapons();
*
called from:
(file 'files/zom.gsc', line 798)
self PlayerSpawned();
*
called from:
(file 'files/zom.gsc', line 1424)
spawnPlayer();
*
called from:
(file 'files/_zommenus.gsc', line 966)
self [[level.weapon]](response);
*
started from:
(file 'files/_zommenus.gsc', line 82)
self waittill("menuresponse", menu, response);
*
************************************
********************
ERROR: script runtime error
(see console for details)
(file 'files/_zommenus.gsc', line 82)

********************
----- Server Shutdown -----
Sending heartbeat to cod2master.activision.com
==== ShutdownGame ====
Going to CS_ZOMBIE for
0: EXE_DISCONNECTED
---------------------------


Someone knows how to fix it?
Share |
IzNoGoD
General Member
Since: Nov 29, 2008
Posts: 694
Last: Nov 10, 2012
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Tuesday, Apr. 17, 2012 08:42 pm
yes, as you can see the self.pers["weapon"] is undefined.

I suspect this is a home-made zommod. You are trying to let the zoms spawn without a weapon, and didnt bother to fill the self.pers["weapon"] var.

Else, this is a bad zommod.
Share |
Spik3d
General Member
Since: Jan 30, 2008
Posts: 130
Last: Feb 19, 2015
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Wednesday, Apr. 18, 2012 12:27 pm
You should post your scripts if you want help with it. Debugging code is impossible when we can't see it, we can only make guesses at what might've went wrong.
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 Scripting

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»