1

# [Update] What does "Unexpected Unicode character: U+202c." mean?

rabbi99 617
1 year ago
Edited 1 year ago

Not much to tell except that I don't know what U+202c means. This is the error: Workspace.Hall.Script:10: Unexpected Unicode character: U+202c and here is my script:

Hall = script.Parent
PrimaryPart = Hall.PrimaryPart
PrimaryPart.Position = Vector3.new(133.875, 0.063, 29.125)
hallClone = Hall:Clone()
hallClone.Parent = game.Workspace
hallClone.Name = "HallClone"
HallCount = 0

local positionCloneX = 133.875 - count * 112.25
print(positionCloneX)
HallClone.PrimaryPart
end

PrimaryPart.Touched:connect(function(hit)
if hit.Parent == game.Players then
HallCount = HallCount + 1
print(HallCount)
end
end)



Keep in mind that this script is just a draft and not complete.

I think I do the math wrong, after all I feel really dumb for not knowing this.

Edit: After a little research, I found out that U+202c is -. So, my question has changed: How does one subtract in scripting. I don't want a literal answer, I want it to have a connection with my script.

1
Can you tell us what print(HallCount) prints? mixgingengerina10 208 — 1y
0
I don't know because that error keeps stopping the script. rabbi99 617 — 1y
1
Oh right, let me see what I can do. mixgingengerina10 208 — 1y
1
Okay so, I found out that "-" = U+202c rabbi99 617 — 1y

1

# Unicode control characters

U+202c is the control character Pop directional formatting which could be inserted if you have a language or input configuration which typically depends on right-to-left formatting such as Arabic scripts.

Using - is the correct way to subtract, and the U+202c control character is typically invisible. Ensure that you're using only left-to-right input methods when writing your scripts.

0
I am writing it in English (United States). rabbi99 617 — 1y
0
Do you have alternative input methods configured? User#6546 0 — 1y
0
So if - is the correct way to subtract, why won't it work on my script. rabbi99 617 — 1y
0
As it's entirely possible you accidentally inserted a control character with an alternative input method whilst typing. User#6546 0 — 1y
0
I will try copy and paste that dash in my script. Maybe that'll work. And no, I'm just using a plain keyboard without any other special additions. rabbi99 617 — 1y
0
And you don't have alternative inputs configured in your OS? User#6546 0 — 1y
0
It is still not working. rabbi99 617 — 1y
0
Cool, that means the issue isn't the dash. You're welcome. Delete the entire line and rewrite it by hand to ensure that you've cleared the control character. User#6546 0 — 1y
0
Nope, just 1 input. rabbi99 617 — 1y
0
Is the problem resolved? mixgingengerina10 208 — 1y
0
KBRM101 413
1 year ago

local positionCloneX = (133.875 - count) * 112.25


And

local positionCloneX = 133.875 - (count * 112.25)


I assume you want to use the first option because of how your code was originally formatted. I hope this solves your problem.

0
Oh, that's required? I will try! rabbi99 617 — 1y
0
Same error. Not working :( rabbi99 617 — 1y
0
Are your sure you're writing the subtract sign in english language and not any language? mixgingengerina10 208 — 1y
0
I am writing it in English (United States) rabbi99 617 — 1y