| View previous topic :: View next topic |
| Author |
Message |
fable520 Newbie cheater
Reputation: 0
Joined: 26 May 2011 Posts: 24 Location: chinese
|
Posted: Sat Jun 11, 2011 8:00 am Post subject: CE 6.1 , edit the "main.lua" file ,but display the |
|
|
CE 6.1 , edit the "main.lua" file ,but display the "?",why ?
编辑了 main.lua 文件,但是不能显示中文,怎么解决?
| Description: |
|
| Filesize: |
276.49 KB |
| Viewed: |
13699 Time(s) |

|
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25835 Location: The netherlands
|
Posted: Sat Jun 11, 2011 8:06 am Post subject: |
|
|
see if you can find a way to write these characters using ansi encoding format (or if it's already ansi, try utf8)
does it work when you run the script inside the lua console in ce ?
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
axdx How do I cheat?
Reputation: 0
Joined: 11 Jun 2011 Posts: 4
|
Posted: Sat Jun 11, 2011 9:42 am Post subject: |
|
|
| Dark Byte wrote: | see if you can find a way to write these characters using ansi encoding format (or if it's already ansi, try utf8)
does it work when you run the script inside the lua console in ce ? |
Yes, it works inside the lua console in ce
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25835 Location: The netherlands
|
Posted: Sat Jun 11, 2011 9:51 am Post subject: |
|
|
Then try saving main.lua using utf8 encoding
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
fable520 Newbie cheater
Reputation: 0
Joined: 26 May 2011 Posts: 24 Location: chinese
|
Posted: Sat Jun 11, 2011 10:12 am Post subject: |
|
|
| how to write ,edit the location of main.lua ?
|
|
| Back to top |
|
 |
axdx How do I cheat?
Reputation: 0
Joined: 11 Jun 2011 Posts: 4
|
Posted: Sat Jun 11, 2011 10:13 am Post subject: |
|
|
| Dark Byte wrote: | | Then try saving main.lua using utf8 encoding |
Got an error message said the following
main.lua error:main.lua: 1: unexpected symbol near '
It propably doesn't eat utf8 file...
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25835 Location: The netherlands
|
Posted: Sat Jun 11, 2011 10:14 am Post subject: |
|
|
use a text editor that can save utf-8 explicitly
for example notepad
in english it's called "save as..." and left of the save button is the encoding box. You should select UTF-8 there and then save as main.lua
as for the error, no idea
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25835 Location: The netherlands
|
Posted: Sat Jun 11, 2011 10:27 am Post subject: |
|
|
looks like lua doesn't like the utf8 header notepad appends
try making your script in the lua console and then save that script directly to main.lua (using the save feature in there)
(add require("defines") at the top)
or find another text editor that can write files in utf8 encoding without adding that header (or edit it out with a hexeditor)
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping
Last edited by Dark Byte on Sat Jun 11, 2011 10:31 am; edited 1 time in total |
|
| Back to top |
|
 |
fable520 Newbie cheater
Reputation: 0
Joined: 26 May 2011 Posts: 24 Location: chinese
|
Posted: Sat Jun 11, 2011 10:29 am Post subject: |
|
|
ok is work
use ultraedit ,save as "UTF-8 NO BOM" format is work
look this ,oh! yeah
| Description: |
|
| Filesize: |
256.82 KB |
| Viewed: |
13599 Time(s) |

|
|
|
| Back to top |
|
 |
axdx How do I cheat?
Reputation: 0
Joined: 11 Jun 2011 Posts: 4
|
Posted: Sat Jun 11, 2011 10:55 am Post subject: |
|
|
Yeah, the above does the trick.
Thank you Dark Byte!
|
|
| Back to top |
|
 |
|