View unanswered posts | View active topics It is currently Thu Dec 26, 2024 3:49 am



Reply to topic  [ 10 posts ] 
 Vector Error? 
Author Message
User avatar

Joined: Mon Mar 25, 2013 11:46 am
Posts: 88
Location: Taking a trip around Uranus
Reply with quote
Post Vector Error?
I seem to get this error when I use the M95 sniper from the General Industries Tech that I'm currently maintaining.


Any help would be great!

Thanks!


Sun Oct 05, 2014 9:50 pm
Profile

Joined: Sun Sep 28, 2014 6:04 pm
Posts: 13
Reply with quote
Post Re: Vector Error?
SceneMan:CastObstacleRay Is being given too many...choices? It's stating that you have the following entered into the array
{SceneManager, Vector, Vector, Vector, Vector, Number, Number, Number}

Then it is telling you what the valid candidates/format are/is
{Vector, Vector, Vector, Vector, Number, Number, Number}

So it's just saying you need to remove the SceneManager: call from the array. (It has more information than it does spots to fill) if you could post the LUA to pastebin and PM me the link or post it in the reply I could help you trouble shoot it.

-Edit-
I think this *should* be the line thats throwing an error.

Code:
local dist = SceneMan:CastObstacleRay(self.Pos + self:RotateOffset(self.BipodOffset), Vector(0, user.Height * 0.5) , strikePoint, lastPoint, user.ID, -1, 0);


If you check here http://wiki.datarealms.com/SceneMan:CastObstacleRay It has a breakdown of what the array should look like.

-edit2+3-

(edit 3, changed the code to what i'm guessing is "moar" correct.)
This is what I'm guessing the line *should* look like.


Last edited by Rhyssia on Tue Oct 07, 2014 7:11 pm, edited 1 time in total.



Mon Oct 06, 2014 4:00 am
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post Re: Vector Error?
The mod uses an older version of CastObstacleRay. The newer one has an argument for what team to ignore, so you have one too few arguments, not too many.

Depending on what the weapon is supposed to do, you could either set the team-to-ignore to -2 (no team), or self.Team, to prevent friendly fire.


Tue Oct 07, 2014 6:25 pm
Profile
User avatar

Joined: Mon Mar 25, 2013 11:46 am
Posts: 88
Location: Taking a trip around Uranus
Reply with quote
Post Re: Vector Error?
CaveCricket48 wrote:
The mod uses an older version of CastObstacleRay. The newer one has an argument for what team to ignore, so you have one too few arguments, not too many.

Depending on what the weapon is supposed to do, you could either set the team-to-ignore to -2 (no team), or self.Team, to prevent friendly fire.


So what do I put exactly? It's a sniper rifle, the M95 in the mod, that's causing the problem. And I can't seem to find where to put what you said


Thu Oct 09, 2014 12:05 am
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post Re: Vector Error?
The arguments for CastObstacleRay are
Code:
SceneMan:CastObstacleRay(Vector1, Vector2, Vector3, Vector4, ID, Team, Material ID, Integer)


The one in the outdated code would look like
Code:
SceneMan:CastObstacleRay(Vector1, Vector2, Vector3, Vector4, ID, Material ID, Integer)



Add in the Team argument in the correct place. "self.Team" should work for the mod's purposes.


Thu Oct 09, 2014 2:08 am
Profile
User avatar

Joined: Mon Mar 25, 2013 11:46 am
Posts: 88
Location: Taking a trip around Uranus
Reply with quote
Post Re: Vector Error?
CaveCricket48 wrote:
The arguments for CastObstacleRay are
Code:
SceneMan:CastObstacleRay(Vector1, Vector2, Vector3, Vector4, ID, Team, Material ID, Integer)


The one in the outdated code would look like
Code:
SceneMan:CastObstacleRay(Vector1, Vector2, Vector3, Vector4, ID, Material ID, Integer)



Add in the Team argument in the correct place. "self.Team" should work for the mod's purposes.


And this line of code would be located under what? Actors, effects ect? Sorry for being such a noob.


Thu Oct 09, 2014 8:50 pm
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post Re: Vector Error?
Look for the code of where the weapon is. Since it's a sniper rifle, I'm going to assume it's somewhere where devices are.

Open the ini file for the gun, look for ScriptPath in the HDFirearm code or bullet code, find the Lua file, find instances of CastObstacleRay to fix.


Fri Oct 10, 2014 1:24 am
Profile
User avatar

Joined: Mon Mar 25, 2013 11:46 am
Posts: 88
Location: Taking a trip around Uranus
Reply with quote
Post Re: Vector Error?
CaveCricket48 wrote:
Look for the code of where the weapon is. Since it's a sniper rifle, I'm going to assume it's somewhere where devices are.

Open the ini file for the gun, look for ScriptPath in the HDFirearm code or bullet code, find the Lua file, find instances of CastObstacleRay to fix.


I found this.

Code:
SceneMan:CastObstacleRay(self.Pos + self:RotateOffset(self.BipodOffset), Vector(0, user.Height * 0.5) , strikePoint, lastPoint, user.ID, -1, 0);


I don't know what to change even with what you said.


Fri Oct 10, 2014 2:19 am
Profile

Joined: Sun Sep 28, 2014 6:04 pm
Posts: 13
Reply with quote
Post Re: Vector Error?
...lol
Try reading my other reply (The 2nd post) And see if that doesn't help.


Fri Oct 10, 2014 6:07 am
Profile
User avatar

Joined: Mon Mar 25, 2013 11:46 am
Posts: 88
Location: Taking a trip around Uranus
Reply with quote
Post Re: Vector Error?
Rhyssia wrote:
...lol
Try reading my other reply (The 2nd post) And see if that doesn't help.


Derp. Lol I'll try what you said in a bit


Fri Oct 10, 2014 8:17 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 10 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.043s | 14 Queries | GZIP : Off ]