|
| 26 Feb 2012 05:02 PM |
| What does that mean? I'm new to scripting and I have no idea how to fix it or what it means. |
|
|
| Report Abuse |
|
|
|
| 26 Feb 2012 05:04 PM |
| It means you have a symbol that shouldn't be there. |
|
|
| Report Abuse |
|
|
stravant
|
  |
 |
| Joined: 22 Oct 2007 |
| Total Posts: 2893 |
|
|
| 26 Feb 2012 05:04 PM |
| It depends on what symbol it is. One useful thing to know in that regard is that "eof" means "end of file", that is, the end of the script. |
|
|
| Report Abuse |
|
|
|
| 26 Feb 2012 05:05 PM |
| I can't find the unexpected symbol.... |
|
|
| Report Abuse |
|
|
|
| 26 Feb 2012 05:06 PM |
| Post the line of code that's erroring. |
|
|
| Report Abuse |
|
|
stravant
|
  |
 |
| Joined: 22 Oct 2007 |
| Total Posts: 2893 |
|
|
| 26 Feb 2012 05:06 PM |
| What's the whole error message, and the lines of code near it? (the line, and the lines before and after it) |
|
|
| Report Abuse |
|
|
|
| 26 Feb 2012 05:17 PM |
I think it is this:
local player - game:GetService('player'):GetPlayerFromCharacter(otherPart.Parent) or game:GetService('player'):GetPlayerFromCharacter(otherPart.Parent.Parent)
The error line is:
Workspace.Part.Script:8: unexpected symbol near 'local' |
|
|
| Report Abuse |
|
|
|
| 26 Feb 2012 05:18 PM |
local player = game:GetService('player'):GetPlayerFromCharacter(otherPart.Parent) or game:GetService('player'):GetPlayerFromCharacter(otherPart.Parent.Parent)
† KMXD † |
|
|
| Report Abuse |
|
|
|
| 26 Feb 2012 05:22 PM |
| It didn't work. The same error message popped up... |
|
|
| Report Abuse |
|
|
|
| 26 Feb 2012 05:23 PM |
| local player = game:GetService('Players'):GetPlayerFromCharacter(otherPart.Parent) or game:GetService('Players'):GetPlayerFromCharacter(otherPart.Parent.Parent) |
|
|
| Report Abuse |
|
|
stravant
|
  |
 |
| Joined: 22 Oct 2007 |
| Total Posts: 2893 |
|
|
| 26 Feb 2012 05:23 PM |
GetService('player')
This should be:
GetService('Players') |
|
|
| Report Abuse |
|
|
|
| 26 Feb 2012 05:32 PM |
| Hmmmm the same message popped up >:( I can't get this.... |
|
|
| Report Abuse |
|
|
MrVoxx
|
  |
| Joined: 24 Feb 2012 |
| Total Posts: 37 |
|
|
| 26 Feb 2012 05:35 PM |
| The number 6 is the line the error is on. THe error message means you have a symbol that is not correct. Which, will be on line 6. |
|
|
| Report Abuse |
|
|
|
| 26 Feb 2012 05:38 PM |
door.Touched:connect(function(otherPart)
That is line 6 |
|
|
| Report Abuse |
|
|
Oysi
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 9058 |
|
| |
|
|
| 26 Feb 2012 05:52 PM |
Sure I used ROBLOX help script so...:
local user = "Pipsqueak609" -- The player's username. This user will be allowed through the door. local groupId = 267773 -- The group's ID. Any user in this group will be allowed through the door. local door = script.Parent -- The door. Assumes this script is in the door. door.Touched:connect(function(otherPart) if not otherPart.Parent then return local player = game:GetService('Players'):GetPlayerFromCharacter(otherPart.Parent) or game:GetService('Players'):GetPlayerFromCharacter(otherPart.Parent.Parent) if not (player and player.Character) then return end if player.Name:lower() == user:lower() or player:IsInGroup(267773) then local found = true local anchoredState = door.Anchored -- Remember whether the door was anchored. local transparencyState = door.Transparency -- Remember the door's tranparency. door.Anchored = true door.CanCollide = false door.Transparency = .5 wait(2) -- You can change this if you want to edit for how long the door stays open. door.CanCollide = true door.Anchored = anchoredState -- Gives back to the door it previous anchored state. door.Transparency = transparencyState -- Give back its transparency to the door. end if not found then player.Character:BreakJoints() -- Kill the player if he's not allowed to go through. Remove this if you don't want the player to die. end
|
|
|
| Report Abuse |
|
|
Oysi
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 9058 |
|
| |
|
|
| 26 Feb 2012 06:22 PM |
Now another error message popped up:
Workspace.Part.Script:31: 'end' expected (to close 'function' at line 6) near ' eof ' eof is in <>
Here is line 6:
door.Touched:connect(function(otherPart) |
|
|
| Report Abuse |
|
|
|
| 27 Feb 2012 02:00 AM |
@Stravant OMG you just helped me out a lot. I did not know what eof meant. Thanks. I do have a lot of the unexpected symbol near things too. Ex. / should be near '(' (line 6)
Then I make a change by putting a / in front of it. Then it says: Unexpected symbol near '('
I get rid of it. It says: / should be near '(' (line 6) again.
This time I put it behind it.
Then it says: Unexpected symbol near '('
And that's why I sometimes get frustrated when scripting. |
|
|
| Report Abuse |
|
|
|
| 27 Feb 2012 02:07 AM |
| need to append "end)" to the end of the script. |
|
|
| Report Abuse |
|
|
Rep0man
|
  |
| Joined: 30 Jul 2013 |
| Total Posts: 52 |
|
|
| 29 Aug 2014 05:49 PM |
| Yeah, you opened parenthesis then opened more inside of them. You only closed one of them. Just add a ) at the end of the line. |
|
|
| Report Abuse |
|
|