Checking the last few letters of an input

CSLib has a subroutine called substring that allows extracting parts of strings. It works like this:

*gosub_scene cslib_string substring <string> <starting point (number)> <end point (number)>

For example:

*gosub_scene cslib_string substring "Hello, World!" 1 5

Thw above would yield a string starting with the first character and ending with the fifth, Hello.

In your use case, it would look something like this:

*gosub_scene cslib_string substring my_variable (length(my_variable) - 2) lenght(my_variable) 

The above would yield the last 3 characters of the string. Note that I subtracted 2 instead of 3, because the starting and ending points are inclusive.