[HTML] Lang File + HTML - Something Wrong?
Every time i try to like test, there's some unknown symbols in the MOTD with a white screen.
Something wrong with this? Here is the code: ( It's the lang file ) Code:
[en] |
Re: [HTML] Lang File + HTML - Something Wrong?
Doesn't look like a lang file to me, it doesn't follow the correct format afaik.
Also, you shouldn't put HTML in a lang file (HTML structure is only interpreted in one language). |
Re: [HTML] Lang File + HTML - Something Wrong?
Put all the HTML in a file. Leave %L placeholders where the translated text should be. Read the text file and use that as the format[] arg of formatex(). Add all ML arguments afterwards.
|
Re: [HTML] Lang File + HTML - Something Wrong?
But i saw Biohazzard mod and it did the same thing as me. Why mine didn't work?
|
Re: [HTML] Lang File + HTML - Something Wrong?
Quote:
|
Re: [HTML] Lang File + HTML - Something Wrong?
You are not escaping all the % correctly.
Code:
<!--{cke_protected}{C}%3C!%2D%2D.sty1%20%7Bcolor%3A%20%23cdcccb%3Bfont-family%3A%20Arial%2C%20Helvetica%2C%20sans-serif%3B%7D%2D%2D%3E--> </style>Example: Code:
Code:
12Code:
"^"Code:
<body bgcolor="^"#000000^"">Code:
<body bgcolor="#000000">What happens when you save a string in pawn containing ^" is that the compiler replaces that with one cell only containing ". The ^ is just to tell the compiler to do so. I would however leave it without quotes since you're almost touching that MOTD limit of 1536 characters, making ML very limited. Save all the space you can. |
Re: [HTML] Lang File + HTML - Something Wrong?
@Neee....l, you can use whole html code in a lang file, instead of line by line.
Code:
Then in the lang file you put the html code. @Black Rose, Nothing worked, it's not just 1 html code in the lang file. Nothing of those html codes works. And is there a way to remove those %? Or just put more characters? |
Re: [HTML] Lang File + HTML - Something Wrong?
I tested the first 4 and the first big one. Works just fine.
Escape % with %% because the escape is for a runtime function, not the compiler. |
Re: [HTML] Lang File + HTML - Something Wrong?
If you've seen it done in another plugin (the version of Biohazzard that I was able to get did not have any HTML in the lang file). If you have a version that does it, you should post the lang file so we can see how they do it (in fact, if you knew of a source that already did it, you should have used that as your template/example).
If it was going to work, you would probably need to put it all on one line with NO whitespace (i.e. all a single line) and make sure to escape all reserved characters (e.g. %). |
Re: [HTML] Lang File + HTML - Something Wrong?
I saw this one:
Code:
HELP_MOTD :That's escape right? Plus, i will remove the Code:
" |
| All times are GMT -4. The time now is 05:58. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.