08.09.2013, 18:16
Have you properly initialized pname and randomplayer yet? I'm not sure if that will have any affect on the second argument's type, but if it hasn't been done, might wanna give that a try. If you have already, not sure. The parameters look right, and str is definitely a string.