Error could not create cob

Error could not create cob

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

User avatar
MrSpontaneous
Posts: 242
Joined: 09 Sep 2005, 22:39

Error could not create cob

Post by MrSpontaneous »

The title is of this post is the most useless error message I have ever encountered. Now my code probably sucks, but I am still inexpiernced with Bos/Cob. In any case, if some one could tell me what is causing this excessively descriptive error, I would greatly appriciate it.

Thanks

Here is the code:

Code: Select all

#define TA			// This is a TA script

#include "sfxtype.h"
#include "exptype.h"

piece  base, arm1, arm2, arm3, arm4, point1, point2, point3, point4;

static-var  nano_changer, zap_changer, is_building;


SmokeUnit(healthpercent, sleeptime, smoketype)
{
	while( get BUILD_PERCENT_LEFT )
	{
		sleep 400;
	}
	while( TRUE )
	{
		healthpercent = get HEALTH;
		if( healthpercent < 66 )
		{
			smoketype = 256 | 2;
			if( Rand( 1, 66 ) < healthpercent )
			{
				smoketype = 256 | 1;
			}
			emit-sfx smoketype from base;
		}
		sleeptime = healthpercent * 50;
		if( sleeptime < 200 )
		{
			sleeptime = 200;
		}
		sleep sleeptime;
	}
}

MotionControl(moving, aiming, justmoved)
{
}

Create()
{
	nano_changer = 0;
	zap_changer = 0;
	is_building = 0;
	start-script SmokeUnit();
}

SetMaxReloadTime()
{
}

StartMoving()
{
}

StopMoving()
{
}

WhenBuilding()
{
  While(is_building == 1)
  {
  sleep 10;
  }
}

SweetSpot(piecenum)
{
	piecenum = base;
}

RestoreAfterDelay()
{
}

AimFromPrimary(piecenum)
{
	piecenum = base;
}

QueryPrimary(piecenum)
{
    start-script WhenBuilding();

    if(zap_changer == 0)
    {
	piecenum = point1;
	}
    if(zap_changer == 1)
    {
	piecenum = point2;
	}	
	if(zap_changer == 2)
    {
	piecenum = point3;
	}
	if(zap_changer == 3)
    {
	piecenum = point4;
	}
	
	zap_changer = zap_changer + 1;
	
	if(zap_changer == 4)
	{
	  zap_changer = 0;
    }
	
	
}

AimPrimary(heading, pitch)
{
	signal 4;
	set-signal-mask 4;
	turn base to y-axis heading speed <1.>;
	turn base to x-axis pitch speed <1.>;
	return (1);
}

FirePrimary()
{
}

QueryNanoPiece(piecenum)
{
	if( nano_changer == 0 )
	{
		piecenum = point1;
	}
	if( nano_changer == 1 )
	{
		piecenum = point2;
	}
	if( nano_changer == 2 )
	{
		piecenum = point3;
	}
	if( nano_changer == 3 )
	{
		piecenum = point4;
	}
	nano_changer = nano_changer + 1;
	
	if(nano_changer == 4)
	  {
	  nano_changer = 0;
	  }
	
}

StartBuilding(heading, pitch)
{
    is_building = 1;
	turn base to y-axis heading speed <200>;
	turn base to X-axis pitch speed <200>;
	wait-for-turn base around y-axis;
	set INBUILDSTANCE to 1;
}

StopBuilding()
{
	set INBUILDSTANCE to 0;
    turn base to y-axis <0> speed <200>;
    turn base to X-axis <0> speed <200>;
    is_building = 0;

	signal 8;
	set-signal-mask 8;
}

Killed(severity, corpsetype)
{
	if( severity <= 25 )
	{
		corpsetype = 1;
		explode base type BITMAPONLY | BITMAP1;
		explode arm1 type SHATTER;
		explode arm3 type SHATTER;
		explode arm4 type SHATTER;
		explode arm2 type SHATTER;
		return (0);
	}
	if( severity <= 50 )
	{
		corpsetype = 2;
		explode base type BITMAPONLY | BITMAP1;
		explode arm1 type SHATTER;
		explode arm3 type SHATTER;
		explode arm4 type SHATTER;
		explode arm2 type SHATTER;
		return (0);
	}
	if( severity <= 99 )
	{
		corpsetype = 3;
		explode base type BITMAPONLY | BITMAP1;
		explode arm1 type SHATTER;
		explode arm3 type SHATTER;
		explode arm4 type SHATTER;
		explode arm2 type SHATTER;
		return (0);
	}
	corpsetype = 3;
	explode base type BITMAPONLY | BITMAP1;
}
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

The entire error message please. Restart Scriptor and try again. Still happenening?
User avatar
MrSpontaneous
Posts: 242
Joined: 09 Sep 2005, 22:39

Post by MrSpontaneous »

Here is the entire error message. . .

Compiling Bos...
Compiling sfxtype.h
Compiling exptype.h

Making Cob...
Error (209): Could not create cob [ C:\Documents and Settings\DoomOfAges\My Documents\Ideas\mod idea\Nightmare\Scripts\AgoSeed.bos ]

One or more errors occured while compiling the script.

yes, the error persists after restarting scriptor

209 is the last line of the script (last line with code any way :roll: )
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

No idea if NTFS could fuck this up but try it on a non NTFS partition...
User avatar
MrSpontaneous
Posts: 242
Joined: 09 Sep 2005, 22:39

Post by MrSpontaneous »

NTFS? I have succesfully compiled other units before, so I don't see why this one would suffer from some sort of opperating system problem.
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

Try putting Create() at the bottom. It's actually always a good idea to do that because it lacks prototypes...

Other than that, no idea. Couldn't see anything it should compile... still this looks like insufficient rights to create or write files in that directory.
User avatar
MrSpontaneous
Posts: 242
Joined: 09 Sep 2005, 22:39

Post by MrSpontaneous »

I don't know what permission I would be missing. . .Do you know which it would be (name etc.) and what it would be located under?
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

Eh no I don't use NTFS but for 2k itself (for a reason) nor WinXP (obvious)...

Try compiling a different script in the same directory to rule out if it's the filesystem. NTFS options can be found in that directory's attribute page... I'd rather not explain now how to find the user rights right now :P
Hum take a working script and reinsert functions from one to the other until you notice what's broken, although I doesn't look broken.

Anyway it's late, 5:35 am (again), gotta catch some Zzzs... :)
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

Your best bet is probably as he said, remove sections until it works, then reinsert them til it doesn't.
User avatar
MrSpontaneous
Posts: 242
Joined: 09 Sep 2005, 22:39

Post by MrSpontaneous »

Looks like its the stupid file system. . .probably reset its self because I had to wipe my harddrive recently. . .

thanks

Edit: still cannot find were to set the permisions. . . :(
User avatar
MrSpontaneous
Posts: 242
Joined: 09 Sep 2005, 22:39

Post by MrSpontaneous »

help? I would rather not sift through all the buggerred windows permissions and administrative info just to compile my lousy unit :| .
Archangel of Death
Posts: 854
Joined: 28 Jan 2005, 18:15

Post by Archangel of Death »

Perhaps there is a bit of rogue data that slipped into the file, scriptor might not show it because it wouldn't know how to interpret it into characters, but it would still have to try to compile it. I think I've had that happen a couple times before.

Try just copy pasting it into a new file.
User avatar
MrSpontaneous
Posts: 242
Joined: 09 Sep 2005, 22:39

Post by MrSpontaneous »

nope, its not that . . .
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Erm... almost always, an error like that indicates something that isn't closed properly.
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

You mean like there's a another "broken" instance of scriptor in the background which got the file rw+ opened?
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Compiles just fine here. Is your harddrive full?
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

rattle wrote:You mean like there's a another "broken" instance of scriptor in the background which got the file rw+ opened?
Nah, he means a closing bracket might be missing. A "}". But KDR says he can compile fine so that must not be the case.
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

I suspected that as well but there wasn't anything missing...
User avatar
MrSpontaneous
Posts: 242
Joined: 09 Sep 2005, 22:39

Post by MrSpontaneous »

My hard drive has plenty of space, I think its what rattle said and for some reason I don't have permission to compile. . .as I tried another script and it would not compile either (that one was already finished, and compiled) and got the same error.

It being most likly that I am lacking the nessiceary permissions, does any one know which one I would be missing and were I can locate it?
User avatar
PauloMorfeo
Posts: 2004
Joined: 15 Dec 2004, 20:53

Post by PauloMorfeo »

MrSpontaneous wrote:Looks like its the stupid file system. . .probably reset its self because I had to wipe my harddrive recently. . .

thanks

Edit: still cannot find were to set the permisions. . . :(
- Right click on a folder or file.
- Select "Properties"
- You should have a tab named "permissions" or something!? Post here which tabs it has. I'm not on a Win right now. Also, WinXP has a nasty tendency to change behaviour of things for ways more *newbie-firendly* which just end up beeing more confusing.

Anyway, try striping a script of everything but the essential and build it. If you can build that but not the one you've shown, it's not permission issues.
Post Reply

Return to “Game Development”