This means that the variable, any kind(global '$', method '@', or local), is undefined. You are probably using draw_text and the string you are passing includes a variable that is undefined. I'd define it if I was you. It could very well be that you are defining the variable, but not until after it has already passed the draw_text method call. I would define it before then at least to empty string "". Another way around it is to have a simple if then statement like this...
if str != nil
@sprite.bitmap.draw_text(x, y, width, height, str)
end
If you're not using the draw_text method, then find a line where you are condensing a string using a variable(s).
Hope that helps! Good luck!