Quote:
Originally Posted by Napoleon_be
Plugin name shouldn't be an integer, but a string.
|
Fun (off-topic) fact: Pawn is a type-less scripting language and for this matter, a string is a character array, not a true string (as in C++) per see. So, integers and chars are
virtually the same.
Code:
register_plugin(0, 0, 0); // error!
register_plugin("...", "...", "..."); // success!
register_plugin({0}, {0}, {0}); // success!
And yes, as Hamlet said chars are encoded as integers. "ABC" would translate to {65, 66, 67, 0} whereas 0 (ASCII - '\0') is EOS (end of string). This of course
may consume less power or at least time, hence Pawn is lightweight.
https://ostermiller.org/calc/ascii.html