Forum

> > CS2D > Scripts > Funny error xD
Forums overviewCS2D overview Scripts overviewLog in to reply

English Funny error xD

4 replies
To the start Previous 1 Next To the start

old Funny error xD

Ajmin
User Off Offline

Quote
I was making a script.
while i found a error.
"unexpected symbol near "i" ".
anyway when i searched here i saw 2 post with this error.
but actually i didnt understood the reason:
"why the error comes"

The funny fact is, i deleted all the txt inside the lua file and then i started the server.
it shows the same

Error for a lua file which is empty xD.

Unfortunately i fixed it:
What i done is i just copied all the txt inside the lua file and dropped all the txt in another lua file.
The script works.

So my query is, why it gave error (in the old file).
if it was a real error why it works in the new lua file? which contains the same.

Actually what was the error here?



but the old file still gives error xD.
edited 3×, last 03.10.14 01:41:30 pm

old Re: Funny error xD

Rainoth
Moderator Off Offline

Quote
Fairly sure multiple threads cover this problem and I don't know what you have to smoke to not understand the explanations. In short, it's encoding problem (ANSI - UTF-8). Most likely it was one encoding in one file and another encoding in the second file, that's why same script worked in second file even though you didn't change the script. To prevent this, try to use "\char" (in CS2D usually © is used when it comes to symbols so it's equivalent would be \169)
edited 1×, last 03.10.14 01:47:22 pm

old Re: Funny error xD

GeoB99
Moderator Off Offline

Quote
If you show the code of this file lua that have this error, someone will understand what is the cause of this error.

old Re: Funny error xD

ohaz
User Off Offline

Quote
perhaps you saved the old file in a not working character encoding
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview