|
|
STRING* and external plugins
#323061
05/11/10 13:17
05/11/10 13:17
|
Joined: Jul 2005
Posts: 1,930 Austria
Dark_samurai
OP
Serious User
|
OP
Serious User
Joined: Jul 2005
Posts: 1,930
Austria
|
Hi! Since A7.84, STRING* doesn't work correct with my external plugins anymore. A short example: Lite-C:
void main()
{
STRING* test_str = str_create("#10");
str_cpy(test_str,"TEST");
exSample_function(test_str);
}
c++:
DLLFUNC void exSample_function(STRING* str)
{
char str_as_char[10];
strcpy(str_as_char,str->chars);
//str_as_char is NOT filled with the correct content
//only with random symbols
}
I guess this is because of the migration of the engine to UNICODE. But shouldn't ->chars still return a normal ASCII character set? How should this be done now? Thanks for your help!
ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)! get free version
|
|
|
Re: STRING* and external plugins
[Re: Dark_samurai]
#323062
05/11/10 13:18
05/11/10 13:18
|
Joined: Jan 2002
Posts: 4,225 Germany / Essen
Uhrwerk
Expert
|
Expert
Joined: Jan 2002
Posts: 4,225
Germany / Essen
|
Have you tried to convert to char with "_chr" ?
Always learn from history, to be sure you make the same mistakes again...
|
|
|
Re: STRING* and external plugins
[Re: Uhrwerk]
#323066
05/11/10 13:25
05/11/10 13:25
|
Joined: Jul 2005
Posts: 1,930 Austria
Dark_samurai
OP
Serious User
|
OP
Serious User
Joined: Jul 2005
Posts: 1,930
Austria
|
Yes, it doesn't work either.
ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)! get free version
|
|
|
|