Raised This Month: $ Target: $400
 0% 

plugin.sp(31) : error 037: invalid string (possibly non-terminated string)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
TheUnderTaker
Senior Member
Join Date: Dec 2013
Location: Israel
Old 08-18-2015 , 12:29   plugin.sp(31) : error 037: invalid string (possibly non-terminated string)
Reply With Quote #1

Umm, how can I put in strings this symbol "」"
Tried to format and it shows me (With/without format) the next error:plugin.sp(31) : error 037: invalid string (possibly non-terminated string)

Can someone help?
__________________
SourcePawn, C# and C++ Programmer.

My plugin list
TheUnderTaker is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 08-18-2015 , 19:43   Re: plugin.sp(31) : error 037: invalid string (possibly non-terminated string)
Reply With Quote #2

Sounds like your trying to use a unicode char which sourcemod doesn't support.

Ps. Share code if you want proper help
__________________
Neuro Toxin is offline
EngHell
Member
Join Date: Jul 2013
Location: Guatemala
Old 08-19-2015 , 01:25   Re: plugin.sp(31) : error 037: invalid string (possibly non-terminated string)
Reply With Quote #3

I didn't know that Unicode is not supported in Sourcemod, that's weird Unicode has been starting to be a standard since 2012
EngHell is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 08-19-2015 , 02:30   Re: plugin.sp(31) : error 037: invalid string (possibly non-terminated string)
Reply With Quote #4

Yea. Sourcemod only supports 8bit char[].

Eg. Utf8
__________________
Neuro Toxin is offline
TheUnderTaker
Senior Member
Join Date: Dec 2013
Location: Israel
Old 08-19-2015 , 04:47   Re: plugin.sp(31) : error 037: invalid string (possibly non-terminated string)
Reply With Quote #5

This is the code
PHP Code:
CPrintToChatAll("Hi」"); 
When I tried to remove the "」" it worked.

btw, I saw server that use this char.
__________________
SourcePawn, C# and C++ Programmer.

My plugin list
TheUnderTaker is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 08-19-2015 , 04:56   Re: plugin.sp(31) : error 037: invalid string (possibly non-terminated string)
Reply With Quote #6

Yea. Valve translations are in utf16 which supports unicode.

The restriction applies to sourcemod stuff.

I'm also unsure if sourcemod extentions hit the same limitation. Logically I think extensions are fine because they are pure c++ code.
__________________
Neuro Toxin is offline
TheUnderTaker
Senior Member
Join Date: Dec 2013
Location: Israel
Old 08-19-2015 , 05:17   Re: plugin.sp(31) : error 037: invalid string (possibly non-terminated string)
Reply With Quote #7

Quote:
Originally Posted by Neuro Toxin View Post
Yea. Valve translations are in utf16 which supports unicode.

The restriction applies to sourcemod stuff.

I'm also unsure if sourcemod extentions hit the same limitation. Logically I think extensions are fine because they are pure c++ code.
So I need extension?
__________________
SourcePawn, C# and C++ Programmer.

My plugin list
TheUnderTaker is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 08-19-2015 , 05:29   Re: plugin.sp(31) : error 037: invalid string (possibly non-terminated string)
Reply With Quote #8

I would question your need for this char and avoid using it. If you have to use it. Try an extension. As stated I'm unsure...
__________________
Neuro Toxin is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 08-19-2015 , 05:33   Re: plugin.sp(31) : error 037: invalid string (possibly non-terminated string)
Reply With Quote #9

Quote:
Originally Posted by Neuro Toxin View Post
Yea. Valve translations are in utf16 which supports unicode.
You are confusing a character set (Unicode) with a character encoding (UTF-8). UTF-8 (and 16, and 32) can represent any Unicode character, which is the entire point of them. Valve's translation files use UTF-16 because that is what the Win32 API uses for Unicode strings, and it avoids a conversion step.
__________________

Last edited by asherkin; 08-19-2015 at 05:34.
asherkin is offline
Miu
Veteran Member
Join Date: Nov 2013
Old 08-19-2015 , 07:47   Re: plugin.sp(31) : error 037: invalid string (possibly non-terminated string)
Reply With Quote #10

Quote:
Originally Posted by TheUnderTaker View Post
This is the code
PHP Code:
CPrintToChatAll("Hi」"); 
When I tried to remove the "」" it worked.

btw, I saw server that use this char.
compiles fine for me!
Miu is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:45.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode