to represent the changes of having " before and after the value, so that it's seen as a string rather than an integer.
Then finally, editing script_set_constant in script.c so that, it properly stores the string value instead of an int.
But, I have no idea where to even begin besides this. I mean, I could be completely wrong with what I think needs to be modified, but in theory it should be possible, since we're already capable of reading strings in other dbs. This one shouldn't be any different if you break it down, it's just matter of how the src handles it :/
How would I go about adding support for string constants?
I know that in script.c there is this code block, which deals with the creation of constants, which is called every time the server starts up.
Going off of this, I'd need to edit 3 things as far as I can tell.
The first being str_data_struct in script.h
I'm assuming I need to add a const char *string in there, but I haven't been able to get that to work.
Then second, i'd need to modify this in script.c
More specifically:
to represent the changes of having " before and after the value, so that it's seen as a string rather than an integer.
Then finally, editing script_set_constant in script.c so that, it properly stores the string value instead of an int.
But, I have no idea where to even begin besides this. I mean, I could be completely wrong with what I think needs to be modified, but in theory it should be possible, since we're already capable of reading strings in other dbs. This one shouldn't be any different if you break it down, it's just matter of how the src handles it :/
Edited by GmOceanShare this post
Link to post
Share on other sites