Checking if script is blank?

K.V.
07 Mar 2018, 19:32

If an attribute is a script attribute, HasScript() returns true, even if there is not actually a script.

Is there a way to see if it is actually a script?


The Pixie
07 Mar 2018, 21:47

What do you mean by "not actually a script". Do you mean an attribute you have set to be a script, but is empty?

if (ToString(game.testscript) = "Script: ") {
  msg ("That script is empty")
}

K.V.
07 Mar 2018, 22:32

That's exactly what I meant. Thank you!