# Lua error "unexpected symbol near '%'"



## OBM-man (Jun 8, 2009)

That's always what I get when I use this character: %
(in Lua edit 5.0 I mean)
It's like it doesn't work.
And I searched with google, the internet is full of trash.
Thanks in advance.


----------



## Ninjaboi (Dec 27, 2010)

LUA-script gives: unexpected symbol near ' ' - GameDev.net



> Aaaah.... I solved the problem... I used notepad and/or wordpad to edit my scriptfiles, these editors set extra control-characters in the files invisible to the eye, but visible to
> the lua-interpreter... using my plain old dos-edit solves the problem ....


Try using something like Notepad++, see if that works.


----------



## OBM-man (Jun 8, 2009)

I used Lua edit 5.0, not notepad. I don't think it should have a problem like that.


----------



## Carpetfizz (Jul 5, 2011)

Just FYI, the percent sign (%) is commonly called a "modulo" in programming.


----------



## OBM-man (Jun 8, 2009)

Carpetfizz said:


> Just FYI, the percent sign (%) is commonly called a "modulo" in programming.


Wow no kidding? That's the modulo operator? And here I was just using it cause it was a nice decoration for my code.


----------



## Carpetfizz (Jul 5, 2011)

There is no reason to snap back sir. Since you just referred to it as "symbol" I thought you didn't know. If you already knew, that's great, and you could've ignored my post.


----------



## Ninjaboi (Dec 27, 2010)

Agreed, no need for hostility.

Anyways, the only thing that I can think of that's the problem is that Lua Edit 5.0 is creating additional content in your code that is not visible when you look at it. Try opening your code in a few other text editors and see what you find. Other than that, I'm out of ideas ( I've never really used Lua ).


----------

