Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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

function AddHall(count)
	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)
		AddHall(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.

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.

4 comments

1

Can you tell us what print(HallCount) prints?

0

I don't know because that error keeps stopping the script.

1

Oh right, let me see what I can do.

1

Okay so, I found out that "-" = U+202c

2 answers

✓ Accepted answer

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.

10 comments

0

I am writing it in English (United States).

0

Do you have alternative input methods configured?

0

So if - is the correct way to subtract, why won't it work on my script.

0

As it's entirely possible you accidentally inserted a control character with an alternative input method whilst typing.

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.

0

And you don't have alternative inputs configured in your OS?

0

It is still not working.

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.

0

Nope, just 1 input.

0

Is the problem resolved?

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

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.

4 comments

0

Oh, that's required? I will try!

0

Same error. Not working :(

0

Are your sure you're writing the subtract sign in english language and not any language?

0

I am writing it in English (United States)

This discussion is preserved as it was. New answers, comments, and votes are closed.