If I try to post a score with player name beginning with numbers I get kPostStatusFailed, although my score is actually posted on the server. So the problem is not in posting but in response from the server.
Can somebody reproduce this?
A fast, easy to use, free, and community supported 2D game engine
If I try to post a score with player name beginning with numbers I get kPostStatusFailed, although my score is actually posted on the server. So the problem is not in posting but in response from the server.
Can somebody reproduce this?
When I tried to delete one of those scores beginning with numbers I got this:
File "/base/python_lib/versions/1/google/appengine/api/datastore_types.py", line 253, in from_path
'Names may not begin with a digit; received %s.' % id_or_name)
BadArgumentError: Names may not begin with a digit; received 123123 dusko@00000000-0000-1000-8000-001451DC1139.
So it seems there is really problem with this kind of cc_playernames
ouch.
bug.
Also, what should I do to prevent users entering some special characters in the beginning like ";'.#$%", it all seems to be invalid...
I thought to compare if first entered character in UITextField is from the set of "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" but I am afraid of international keyboards. I don't know how international keyboards work at all, and for example Japanese characters are maybe not in that scope...
Any ideas?
Uh just found that you can't for example enter character ";" anywhere in the cc_playername. I can't track all those illegal chars.
Riq, do you know what are legal characters for cc_playername anyway?
Sorry, I don't know what are the invalid character :-(
I guess I should do some tests on that, and also add a validate_name function on the cocoslive client.
I'll try to do it for v0.8.1
you can use the "name/number" keyboard option in IB. i do and now no illegal chars get through. Also international character sets use UTF8 coding and NSString/NSTextField handle that no problem. be careful saving such characters. i use sqlite3 dbase and have to use UTF8 format.
ive tried submitting various int'l characters to server and works fine
it seems that this bug only is affecting the games that has ranking enabled.
if you game is not using ranking, it will accept digits as names
update:
if the name contains ";" it will fail both with rankings and without rankings
i use numbers in names with ranking and it works no problem
I was looking for a way to block illegal characters from hiscore names and I found this thread. I'm using a UITextField and the iPhone keyboard, so I tried the UIKeyboardTypeNamePhonePad as keyBoardType and that removed all the illegal chars. Problem is, now I can't enter capital characters anymore. I've always used UITextAutocapitalizationTypeWords as autocapitalizationType but that doesn't work anymore.
Any ideas?
thank you very much!
You must log in to post.