Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

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

Asked by
rabbi99 714 Moderation Voter
5 years ago
Edited 5 years 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:

01Hall = script.Parent
02PrimaryPart = Hall.PrimaryPart
03PrimaryPart.Position = Vector3.new(133.875, 0.063, 29.125)
04hallClone = Hall:Clone()
05hallClone.Parent = game.Workspace
06hallClone.Name = "HallClone"
07HallCount = 0
08 
09function AddHall(count)
10    local positionCloneX = 133.875 - count * 112.25
11    print(positionCloneX)
12    HallClone.PrimaryPart
13end
14 
15PrimaryPart.Touched:connect(function(hit)
View all 21 lines...

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.

Every answer counts! Thank you

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 223 — 5y
0
I don't know because that error keeps stopping the script. rabbi99 714 — 5y
1
Oh right, let me see what I can do. mixgingengerina10 223 — 5y
1
Okay so, I found out that "-" = U+202c rabbi99 714 — 5y

2 answers

Log in to vote
1
Answered by 5 years ago

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 714 — 5y
0
Do you have alternative input methods configured? User#6546 35 — 5y
0
So if - is the correct way to subtract, why won't it work on my script. rabbi99 714 — 5y
0
As it's entirely possible you accidentally inserted a control character with an alternative input method whilst typing. User#6546 35 — 5y
View all comments (6 more)
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 714 — 5y
0
And you don't have alternative inputs configured in your OS? User#6546 35 — 5y
0
It is still not working. rabbi99 714 — 5y
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 35 — 5y
0
Nope, just 1 input. rabbi99 714 — 5y
0
Is the problem resolved? mixgingengerina10 223 — 5y
Ad
Log in to vote
0
Answered by 5 years ago

Your math is incorrect. You need to add parenthesis in order for your program to run. Your options are:

1local positionCloneX = (133.875 - count) * 112.25

And

1local 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 714 — 5y
0
Same error. Not working :( rabbi99 714 — 5y
0
Are your sure you're writing the subtract sign in english language and not any language? mixgingengerina10 223 — 5y
0
I am writing it in English (United States) rabbi99 714 — 5y

Answer this question