Checking if script is blank?

K.V.

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?


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.

That's exactly what I meant. Thank you!


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums