There is somthing I’m missing in the scrpting language of NWN.
I’m missing a function that returns the code of Character. (VBA-Equivalent is “asc”)
i.e. A call of this function with the parameter “A” should return the value 64.
How to convert an Hex-String into an int?
int i = StringToInt (“0xDDDD”) fails. i is 0 after that call.
I already found workarounds for this missing functions, but I wonder if somebody could tell me if they are really not there.
There’s plenty of other times a function needs to be made up, mainly around math and strings, from other ones. Adding functions that are easily made just takes time away from adding more useful stuff you can’t make.
I mean you can define ascii codes in nwn directly now, or search along a line them for a specific one (string to its int) I guess. Or use functions available in sqlite to do it.
It really depends on your use case, I’ve never heard of someone needing the raw ascii codes of text before.
Yes, of course. Seemingly later versions of the EE are a bit advanced, now “escaped” hex-values are allowed. “\x22” should be a single ". This also points out, that there is nothing similar in 1.69.
I already said in my original post, I already found a workaround for my problem. I’m just curious.
I’ll have a close look on the StringToRGB function.
Thanks.
edit: StringToRGB just picks single characters from a “color-string” with the GetSubString-Function. The “color-string” is given as literal in the code.