Jump to content

Solved: '=' expected near 'function'


Kenneth Nyström
 Share

Recommended Posts

So I am moving along with this video tutorial series  # 25 checkpoint manager  @ around 1143: on YT to get the hang of the basics.

but I get a  '=' expected near 'function'

(on the 6th line from end: function Script:GetCheckpointPosition()

I cant figure out why it isnt working. (pretty sure I have followed the instructions right) triple checked the text...

------------------------------------------------- 

Script.defaultCheckpoint = "" --entity "Default checkpoint"
Script.currentCheckpoint = nil

function Script:Start()
    if self.defaultCheckpoint == nil then 
    error ("No default checkpoint")
end

    self.currentCheckpoint = self.defaultCheckpoint


End

function Script:GetCheckpointPosition()
    return self.currentCheckpoint:GetPosition(true)
end

function Script:GetCheckpointRotation()
    return self.currentCheckpoint:GetRotation(true)
end

 

Edited by Kenneth Nyström
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...