MODSonline
  Welcome Guest to MODSonline Home | Forums | Register | Login
Main-Menu
Home
Login
Register
Add Download
Add News
Add Tutorial *
Forums

Advertise
Affiliate Store US *
Affiliate Store UK *
Affiliate Store CA *
Angry Letter Generator
Avatar Upload
Calendar of Games
Contact
Downloads
FAQs
Forums
Member List
Member Projects
News
News Grabber *
Policy
Polls
Private Messages
Reviews
Screenshot Gallery
Search
Servers - Game
Store - Shirts *
Subscribe
Topics
Tutorials
Weblinks
Wiki *
Tutorials
CoD Mapping
CoDUO Mapping
CoD2 Mapping
CoD4 Mapping
CoDWW Mapping
CoD FAQs
HL2 Mapping
HL2 FAQs
SOF1 Mapping
Crysis Mapping
Q4 Mapping
Doom 3 Mapping
Doom 3 FAQs
UT2K3 Mapping
SOF2 Mapping
SOF2 FAQs

Lightray Modeling
General Modeling
General Modding
Adobe Photoshop
Common Mapping Errors

Readme.txt Generator
Members-Online
h3spawn [Searc]
fredisdead [Forum]
RePhLeX [Forum]
Slipknot14 [Forum]
cornrow_wa... [Today]
FiremanPaul [Forum]
ZolPo [Forum]
Sniperdennis [Forum]
Rainbowsix [Forum]

9 Members and 25 Guests
Chat MODSonline
0 People Now Chatting
MODSOnline TeamSpeak

download TeamSpeak

In-The-News
Saturday, Nov. 22nd
CoD:WW Video Tutorial is up!
Friday, Nov. 21st
MODSonair Episode 154
Thursday, Nov. 20th
Call Of Duty World At War - Mod Tools
Wednesday, Nov. 19th
Half-Life 1 $0.98
Sunday, Nov. 16th
MODSonair 154 Live
Latest Poll
Would you pay for mod tools?
I would pay a one time fee for mod tools for my favorite title 8.42%
I would pay a monthly/yearly subsrciption fee for mod tools for my favorite title 0.5%
I already paid for the game - Tools should come bundled because I am just fixing what the developers broke 67.82%
100% definitely NOT! 19.31%
I haven't seen a game yet that wasn't 100% perfect when the developers released it 2.48%
Games are the devil! 1.49%
Read More...
16 comments

Newsletter
Name:
Email:
Newsletter Archives
Your Membership
User Name:
Password:
Register.
In The Forums
Script compile error
CoD2 Scripting.. Posts: (3) Views: (17) by Sniperdennis
skybox problem
CoD:WW Level Des.. Posts: (3) Views: (47) by fredisdead
Single PLayer Spawn Problem
CoD:WW Level Des.. Posts: (1) Views: (3) by Rainbowsix
compiling errors
CoD:WW Level Des.. Posts: (26) Views: (281) by COLMAC
Google 468 Banner Half-Life 2 Mods for Dummies
CoDWW Download
Forums
MODSonline.com 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 4
Category: CoD 4 Scripting
Scripting and coding with Call of Duty 4.
Moderators: foyleman, rEdrUmMDK, Foxhound, Rasta, StrYdeR, The_Caretaker, batistablr, playername, Welshy
Latest Posts
Subscribed Posts
Search
Restricted Access Restricted Access subscribe
Author Topic: type undefined is not an int: script error
Jsyhitman
General Member
Since: Jun 24, 2005
Posts: 38
Last: Aug 3, 2008
[view latest posts]
Level 2
Category: CoD 4 Scripting
Posted: Tuesday, Jun. 24, 2008 10:57 am
Hi,

I am still have some script problems, I already made a post in level desgin section,
http://www.modsonline.com/Forums-top-82305.html

However I beleive the problem is script related, but i just can't get anywhere with it.

Basicly I want to trigger an fx from an exploding wall using script_exploder

Heres the error I am getting from console:

Quote:
******* script runtime error *******
type undefined is not an int: (file 'maps/mp/_utility.gsc', line 98)
playfx( level._effect[ self.v[ "fxid" ] ], self.v[ "origin" ], self.v[ "forward" ], self.v[ "up" ] );
*
Error: called from:
(file 'maps/mp/_utility.gsc', line 804)
ent thread cannon_effect();
*
Error: called from:
(file 'maps/mp/_utility.gsc', line 778)
activate_exploder( num );
*
Error: called from:
(file 'maps/mp/_utility.gsc', line 58)
[[ level.exploderFunction ]]( num );
*
Error: called from:
(file 'maps/mp/_load.gsc', line 138)
maps\mp\_utility::exploder( trigger.script_exploder );
*
Error: started from:
(file 'maps/mp/_load.gsc', line 128)
trigger waittill( "trigger" );


And this is my map and script stuff:

Quote:
The fx entity has the following:
classname/script_model
model/fx
script_exploder/30
script_fxid/wallexplode

This is my mapname.gsc:
main()
{
maps\mp\_load::main();

ambientPlay("ambient_backlot_ext");

game["allies"] = "sas";
game["axis"] = "opfor";
game["attackers"] = "axis";
game["defenders"] = "allies";
game["allies_soldiertype"] = "woodland";
game["axis_soldiertype"] = "woodland";

setdvar( "r_specularcolorscale", "1" );

setdvar("r_glowbloomintensity0",".25");
setdvar("r_glowbloomintensity1",".25");
setdvar("r_glowskybleedintensity0",".3");
setdvar("compassmaxrange","1800");
}

This is my mapname_fx.gsc:

main()
{

level._effect["firelp_med_pm"] = loadfx ("fire/firelp_med_pm_nodistort");
level._effect["firelp_small_pm"] = loadfx ("fire/firelp_small_pm");
level._effect["firelp_small_pm_a"] = loadfx ("fire/firelp_small_pm_a");
level._effect["dust_wind_fast"] = loadfx ("dust/dust_wind_fast");
level._effect["dust_wind_slow"] = loadfx ("dust/dust_wind_slow_yel_loop");
level._effect["dust_wind_spiral"] = loadfx ("dust/dust_spiral_runner");
level._effect["hawk"] = loadfx ("weather/hawk");
level._effect["bird_seagull_flock_large"] = loadfx ("misc/bird_seagull_flock_large");
level._effect["wallexplode"] = loadfx ("explosions\wall_explosion_grnd");

//ambient runners
level._effect[ "mp_overgrown_insects01" ] = loadfx( "ambient_runners/mp_overgrown_insects01" );

/#
if ( getdvar( "clientSideEffects" ) != "1" )
maps\createfx\mp_test_fx::main();
#/


}



Any suggestions were I am going wrong?
LS-R1-mini
General Member
Since: Dec 25, 2006
Posts: 14
Last: Sep 8, 2008
[view latest posts]
Level 1
Category: CoD 4 Scripting
Posted: Tuesday, Jun. 24, 2008 11:34 am
Hi m8
im not much of a scripter but with the looks of it you have a ' after the .gsc
(file 'maps/mp/_utility.gsc', line 804)
i dont think it should be there but im learning so it could be anything?
Hope im right as it means im learning LOL

edited on Jun. 24, 2008 11:35 am by LS-R1-mini
The_Caretaker
Preferred Member
Since: Jun 8, 2004
Posts: 11559
Last: Oct 4, 2008
[view latest posts]
Level 10
Forum Moderator
Category: CoD 4 Scripting
Posted: Tuesday, Jun. 24, 2008 11:50 am
No, that's not it, that's the error message, telling in which .gsc file the error occurs, nothing to do with the actual error

My guess is a typo somewhere (most likely the sript_fxid value), because of that, the script doesn't know where to place the explosion effect, because the position of it is not defined.

Do you other effects work?
LS-R1-mini
General Member
Since: Dec 25, 2006
Posts: 14
Last: Sep 8, 2008
[view latest posts]
Level 1
Category: CoD 4 Scripting
Posted: Tuesday, Jun. 24, 2008 12:33 pm
just goes to show i aint learned nowt [duh]
oh well back to the drawing board
Jsyhitman
General Member
Since: Jun 24, 2005
Posts: 38
Last: Aug 3, 2008
[view latest posts]
Level 2
Category: CoD 4 Scripting
Posted: Tuesday, Jun. 24, 2008 03:11 pm
Yes all my other fx work fine.
I have double and tripple checked for any typo's.
Jsyhitman
General Member
Since: Jun 24, 2005
Posts: 38
Last: Aug 3, 2008
[view latest posts]
Level 2
Category: CoD 4 Scripting
Posted: Tuesday, Jun. 24, 2008 03:41 pm
Fixed it, it was a typo, in the _fx.gsc

level._effect["wallexplode"] = loadfx ("explosions\wall_explosion_grnd");

The slash was the wrong way around.

Cheers forall the help guys
Restricted Access Restricted Access subscribe
MODSonline.com Forums : Call of Duty 4 : CoD 4 Scripting
All logos and trademarks and information in this site are property of MODSonline LLC © 2008.
The comments are property of their posters.
RSS news feeds for MODSonline can be found News.php.
MODSonline Subscriptions
Partners
Frag Universe
modbase.be
XoXide
Call of Duty Headquarters
CODAddicts - Call of Duty News & Downloads
The Firing Box
Battle for Europe COD2
Ask About
Advertising
Friends
Great Gamer
MODS Reloaded
After Life Gaming
Ask About
Advertising
Link to Us
MODSonair
View in iTunes
Please help us to raise in the ranks of podcasting and subscribe to our itunes feed using the link above.
MODSonair Releases
MODSonair Episode 154
MODSonair Episode 153
MODSonair Episode 152
MODSonair Episode 151
Video server move
Next Show
The next MODSonair show will air LIVE on:
11/23/2008 12:00 EST

Time remaining:
Copyright © 2008 MODSonline
Tresware Content Management System Copyright © 2008 Tresware
Website Designed and Hosted   Tresware