【问题标题】:'<eof>' expected near 'end' [closed]'<eof>' 预计接近 'end' [关闭]
【发布时间】:2021-05-09 08:44:05
【问题描述】:

好的,所以我正在编写一个快速对齐函数,然后运行它。它应该可以工作,但我收到此错误:

&lt;eof&gt; 在“结束”附近除外

function Align(Part1,Part0,Position,Angle,name)



  local AlignPos = Instance.new("AlignPosition", Part1);

  AlignPos.Parent.CanCollide = false;
  AlignPos.ApplyAtCenterOfMass = true;
  AlignPos.MaxForce = 67752;

  AlignPos.MaxVelocity = math.huge/9e110;

  AlignPos.ReactionForceEnabled = false;

  AlignPos.Responsiveness = 200;

  AlignPos.RigidityEnabled = false;



  local AlignOrient = Instance.new("AlignOrientation", Part1);

  AlignOrient.MaxAngularVelocity = math.huge/9e110;

  AlignOrient.MaxTorque = 67752;

  AlignOrient.PrimaryAxisOnly = false;

  AlignOrient.ReactionTorqueEnabled = false;

  AlignOrient.Responsiveness = 200;

  AlignOrient.RigidityEnabled = false;



  local AttachmentA=Instance.new("Attachment",Part1);



  local AttachmentB=Instance.new("Attachment",Part0);

  AttachmentB.Orientation = Angle

  AttachmentB.Position = Position

  AttachmentB.Name = name



  AlignPos.Attachment0 = AttachmentA;

  AlignPos.Attachment1 = AttachmentB;



  AlignOrient.Attachment0 = AttachmentA;

  AlignOrient.Attachment1 = AttachmentB;

end

所以我想知道,有没有办法解决这个问题?
因为它应该工作

【问题讨论】:

    标签: lua eof roblox


    【解决方案1】:

    提供的代码不会产生此错误。此错误通常是由多余的end 引起的。

    【讨论】:

      猜你喜欢
      • 2019-07-22
      • 2014-06-03
      • 2019-08-28
      • 2013-03-03
      • 1970-01-01
      • 1970-01-01
      • 2016-06-27
      • 2016-05-07
      • 1970-01-01
      相关资源
      最近更新 更多