Page 1 of 1

What is this?

Posted: Wed Jul 16, 2003 11:01 pm
by Alcoholic
Here's the error:

Code: Select all

		if (isalive self && isalive local.player && sighttrace self.gun1.origin local.player.origin 1 64 local.sightrange) (global/cerebralarmor.scr, 158)
		if (isalive self && isalive local.player && ^

^~^~^ Script Error: Cannot cast 'int' to vector

xtank can not find a target. Waiting 6 seconds before another search.

And heres the code its referring to:

Code: Select all

	for (local.p = 1; local.p <= $player.size; local.p++)
	{
		local.player = $player[local.p]
//		if (isalive self && isalive $player[local.p] && self.spotter cansee $player[local.p] 90 local.sightrange)
		if (isalive self && isalive local.player && sighttrace self.gun1.origin local.player.origin 1 64 local.sightrange)
		{
			self.enemytarget = local.player
			self thread tank_attack local.sightrange
			end
		}
	}
	println (self + " can not find a target. Waiting 6 seconds before another search.")
Whats wrong with it? I cant figure out whats wrong.

Posted: Wed Jul 16, 2003 11:46 pm
by Alcoholic
nevermind i figured it out.. the "64 local.sightrange" part is where it needed vectors, but the 2 values were single numbers...

Posted: Thu Jul 17, 2003 9:32 pm
by Alcoholic
yeah jv_map what happened was yesterday i posted that one in mapping and it never showed me it posted successfully so i posted the smaller version here.