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

Members Online

»
0 Active | 54 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 4
Category: CoD4 Scripting
Scripting and coding with Call of Duty 4.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Next Page
subscribe
Author Topic: Script error
guedoe
General Member
Since: Sep 1, 2012
Posts: 18
Last: Jan 4, 2013
[view latest posts]
Level 1
Category: CoD4 Scripting
Posted: Saturday, Sep. 1, 2012 10:39 pm
Hey all, was wondering if someone could clarify how to locate an error. I know the file that is causing the error but cannot locate where the error is. All I get from the console is"Error: unknown function: @ 60660". Anyone know what location in my file its telling me to look at?
Share |
Tally
General Member
Since: Apr 21, 2005
Posts: 819
Last: Oct 26, 2012
[view latest posts]
Level 7
Category: CoD4 Scripting
Posted: Sunday, Sep. 2, 2012 04:54 am
It's telling you there is an error in your script. Please post it. No one can help you if you don't tell them what your script looks like.
Share |
guedoe
General Member
Since: Sep 1, 2012
Posts: 18
Last: Jan 4, 2013
[view latest posts]
Level 1
Category: CoD4 Scripting
Posted: Sunday, Sep. 2, 2012 03:36 pm
attachment: application(12.9Kb)
Here is the script code, its the _hardpoints.gsc. We are trying to add the Havock helicopter. I have it as an attachment since the code it too long.
Share |
Tally
General Member
Since: Apr 21, 2005
Posts: 819
Last: Oct 26, 2012
[view latest posts]
Level 7
Category: CoD4 Scripting
Posted: Sunday, Sep. 2, 2012 03:49 pm
guedoe writes...
Quote:
Here is the script code, its the _hardpoints.gsc. We are trying to add the Havock helicopter. I have it as an attachment since the code it too long.


Where did you get that script from?
Share |
guedoe
General Member
Since: Sep 1, 2012
Posts: 18
Last: Jan 4, 2013
[view latest posts]
Level 1
Category: CoD4 Scripting
Posted: Sunday, Sep. 2, 2012 06:22 pm
I have this script in maps/mp/gametypes, but I narrowed the error to these line here.

else if ( hardpointType == "havock_mp" )
{
if( isDefined( level.chopper ) || level.havock_ingame )
{
self iprintlnBold( level.hardpointHints["helicopter_mp_not_available"] );
return false;
}

if ( level.teambased )
{
maps\mp\gametypes\_globallogic::leaderDialog( "helicopter_inbound", team );
maps\mp\gametypes\_globallogic::leaderDialog( "enemy_helicopter_inbound", otherTeam );

for ( i = 0; i < level.players.size; i++ )
{
player = level.players;
playerteam = player.pers["team"];
if ( isdefined( playerteam ) )
{
if ( playerteam == team )
player iprintln( &"HARDPOINTS_HELICOPTER_DEPLOYED", self );
}
}
}
else
{
self maps\mp\gametypes\_globallogic::leaderDialogOnPlayer( "helicopter_inbound" );
selfarray = [];
selfarray[0] = self;
maps\mp\gametypes\_globallogic::leaderDialog( "enemy_helicopter_inbound", undefined, undefined, selfarray );
}

random_path = randomint( level.heli_paths[0].size );
startnode = level.heli_paths[0][random_path];

self thread maps\mp\_havock::spawnhavock( self, startnode, self.pers["team"] );

}
Share |
DPGmaximus
General Member
Since: Aug 22, 2011
Posts: 2
Last: Sep 2, 2012
[view latest posts]
Level 0
Category: CoD4 Scripting
Posted: Sunday, Sep. 2, 2012 06:27 pm
Hey Tally! Guedoe is a member of my clan who has done modding in BF2. He is new to modding in CoD4. We are simply trying a few things out such as adding a Havoc Mi28 helicopter to re-reference the cobra/hind. We found some info on how to do it. Its just a little project were doing with our current mod.
Share |
Tally
General Member
Since: Apr 21, 2005
Posts: 819
Last: Oct 26, 2012
[view latest posts]
Level 7
Category: CoD4 Scripting
Posted: Sunday, Sep. 2, 2012 06:57 pm
DPGmaximus writes...
Quote:
Hey Tally! Guedoe is a member of my clan who has done modding in BF2. He is new to modding in CoD4. We are simply trying a few things out such as adding a Havoc Mi28 helicopter to re-reference the cobra/hind. We found some info on how to do it. Its just a little project were doing with our current mod.


Hello Max

Obviously, I recognised the code as my own, so at first I thought he might have decompiled my mod and got it that way. I would still have helped him, just that he should credit me for the stuff I did.

So, no problem if he is working with you.
Share |
guedoe
General Member
Since: Sep 1, 2012
Posts: 18
Last: Jan 4, 2013
[view latest posts]
Level 1
Category: CoD4 Scripting
Posted: Sunday, Sep. 2, 2012 07:01 pm
You can still help if you want :), We r trying to have the havock for a carepackage and killstreak, but with just using the havock model and using all code from the cobra or hind. As Max stated, I am very new at this, lol

edited on Sep. 2, 2012 12:01 pm by guedoe
Share |
DPGmaximus
General Member
Since: Aug 22, 2011
Posts: 2
Last: Sep 2, 2012
[view latest posts]
Level 0
Category: CoD4 Scripting
Posted: Sunday, Sep. 2, 2012 07:01 pm
Np Tally I understand. He knows to credit you for w/e we do. Our mod is still currently not released for public use (raw files). I believe we will probably always keep it private with us, but if that would ever change I would definitely inform you first and place credit where credit is due for you, as well as anyone else who worked on the project.
Share |
Tally
General Member
Since: Apr 21, 2005
Posts: 819
Last: Oct 26, 2012
[view latest posts]
Level 7
Category: CoD4 Scripting
Posted: Sunday, Sep. 2, 2012 07:03 pm
guedoe writes...
Quote:
I have this script in maps/mp/gametypes, but I narrowed the error to these line here.

else if ( hardpointType == "havock_mp" )
{
if( isDefined( level.chopper ) || level.havock_ingame )
{
self iprintlnBold( level.hardpointHints["helicopter_mp_not_available"] );
return false;
}

if ( level.teambased )
{
maps\mp\gametypes\_globallogic::leaderDialog( "helicopter_inbound", team );
maps\mp\gametypes\_globallogic::leaderDialog( "enemy_helicopter_inbound", otherTeam );

for ( i = 0; i < level.players.size; i++ )
{
player = level.players;
playerteam = player.pers["team"];
if ( isdefined( playerteam ) )
{
if ( playerteam == team )
player iprintln( &"HARDPOINTS_HELICOPTER_DEPLOYED", self );
}
}
}
else
{
self maps\mp\gametypes\_globallogic::leaderDialogOnPlayer( "helicopter_inbound" );
selfarray = [];
selfarray[0] = self;
maps\mp\gametypes\_globallogic::leaderDialog( "enemy_helicopter_inbound", undefined, undefined, selfarray );
}

random_path = randomint( level.heli_paths[0].size );
startnode = level.heli_paths[0][random_path];

self thread maps\mp\_havock::spawnhavock( self, startnode, self.pers["team"] );

}


The only thing I can see in there that might possibly be an unrecognised function is spawnHavock(). Make sure you have that function in your _havock.gsc file.

If it isn't that function, you are going to have to get the full readout of the error. To do that, enable logfile:

set logfile 1

Then, in your mod folder there will be a file called console_mp.log. Run your test server again, let the game produce the error again, then go get console_mp.log, open it with a text editor and then scroll down until you see "script compile error .." and read what file and function the error is pointing at.
Share |
Restricted Access Topic is Locked
Page
Next Page
subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 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

»