So I notice a while ago that ruby 1.9.1 has msgbox and I wanted to know what was the difference between:
- msgbox and print
- p and msgbox_p
As far as I can see, both functions look and act the same.
If I remember correctly, "p" is more of a debug tool, it uses the "inspect" method to determine what to output, while "print" (I think just an alias for "pretty_print", uses the standard "to_s" to determine the output.
Both will be usually the same, but "p" will have a different output if "to_s" is overridden in the class.
test = Array.new
p test
print test
class Array
def to_s
"ARRAY"
end
end
p test
print test
ops I worded that wrong :facepalm:. I fix the OP.
Quote from: RMVXA Help File-RGSS Specifications
It is now possible to use editor options to open a console window for debugging output during play testing.
Output to message boxes using the print function and the p function has been abolished due to the aforementioned improvement. These functions have been renamed msgbox and msgbox_p.
So tell me how you are able to get print and msgbox to both work, besides doing something like
def print(*args)
msgbox(*args)
end
def p(*args)
msgbox_p(*args)
end
Okay so it's just a upgrade with a new name.