Goonstation Forums
Minor Eval '-' operator does not work with strings in variables - Printable Version

+- Goonstation Forums (https://forum.ss13.co)
+-- Forum: Discussion (https://forum.ss13.co/forumdisplay.php?fid=6)
+--- Forum: Bug Reports (https://forum.ss13.co/forumdisplay.php?fid=9)
+--- Thread: Minor Eval '-' operator does not work with strings in variables (/showthread.php?tid=9211)



Eval '-' operator does not work with strings in variables - NinjaKyat - 08-15-2017

Hi!

First thing's first - currently if you try and eval with a string, number and the minus '-' operator, it trims a number of characters from the end of the string.

So, if you do something like "eval pootis 1 -" it outputs "poot". (Not sure why 0 trims 1 character, 1 trims 2 characters, but I guess it doesn't really matter. Just a bit confusing).

However, if you have a string stored in some variable, like var and you try doing "eval var 1 -" you get nothing. No output. Trying to store the result in a variable also does nothing.

The '+' operator works and it concatenates the string, so I assume there's some sort of bug in here or my misunderstanding in the inner-workings of the system.