Author Topic: [BL SOURCE CODE/REFERENCE] Building related functions  (Read 3452 times)

I've never heard of those functions before
that would be useful to know

This is the very reason that scripting to Blockland is difficult as there might be information available, but most of it is that you decipher yourself and never share it.

From what I know, expandEscape will add escape character(backslash \) for certain characters, like backslash (\) and quote (").
The other function, getSafeVariableName, will cleanup the string so it contains characters that could be used inside of a variable:
Code: [Select]
$myVar[getSafeVariableName($arrayIndex)];
Of course, anything could be put there anyway, but it's most recommended to use it to make sure you are in the green.

And as always, I could be completely wrong on this, then please correct me.

You shouldn't have to stress over getSafeVariableName. So long as you're not exporting $myVar* anywhere, you can use any string you want.

You shouldn't have to stress over getSafeVariableName. So long as you're not exporting $myVar* anywhere, you can use any string you want.

Fair point.