Runner [Done]

Previous topic - Next topic

Slydog

I'm guessing 'Nobody' is a reserved word?  Or a default/reserved user name.
I Googled 'Nobody' in reference to SQL, but of course that's a difficult search.
I saw one reference to 'Nobody, Nouser, ..." so I wonder if 'Nouser' is a problem too.

Without knowing how you are using the 'name_entered$' in your SQL statement, it would just be a bunch of guessing.  Are you creating a dynamic SQL statement such as:
"insert into HIGH_SCORES values('" + name_entered$ + "', '" + password$ + "' . . . .

And is the column for the name just a regular string type, or a special user name type? (I don't know what database you are using, and really only have experience with Oracle).
My current project (WIP) :: TwistedMaze <<  [Updated: 2015-11-25]

Gregory Atlas

#16
Quote from: Slydog on 2010-Dec-01
I'm guessing 'Nobody' is a reserved word?  Or a default/reserved user name.
I Googled 'Nobody' in reference to SQL, but of course that's a difficult search.
I saw one reference to 'Nobody, Nouser, ..." so I wonder if 'Nouser' is a problem too.

Without knowing how you are using the 'name_entered$' in your SQL statement, it would just be a bunch of guessing.  Are you creating a dynamic SQL statement such as:
"insert into HIGH_SCORES values('" + name_entered$ + "', '" + password$ + "' . . . .

And is the column for the name just a regular string type, or a special user name type? (I don't know what database you are using, and really only have experience with Oracle).

I build a linux server in glbasic for the highscore, its managing the SQL entries, it has nothing to do with the SQL.
Cause it wont get any informations, the game will crash before it can send any informations to the server.

I upload a screenshot now so you can see what happens on the Windows 7.

Nobody - crashes the game
Nouser - crashes the game too

The error of Windows 7 says i should go here to see why it happens: http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0407

That´s very interesting now.

[attachment deleted by admin]
.... Homepage ....

Slydog

Interesting.
So the pattern is either words beginning with 'No', or words that are 6 characters long (ha, or both!).
Or it could still be only specific words for some reason.

It could be specific words depending on how you use the string variable I guess.
ie. You don't use it for the file's owner do you?  (I'm really stretching here perhaps)
My current project (WIP) :: TwistedMaze <<  [Updated: 2015-11-25]

Gregory Atlas

#18
Something strange was happening, i compiled the game again after i added some SUB for an Error Screen if you cannot send the info to the server, just a screen with drawsprite. Now it works with Nobody and Nouser.... o.o

Forgot to mention i had the Debug Mode on.
.... Homepage ....

Gregory Atlas

#19
After an hour of testing what causes the crashing i found out what it is.....  :S

Code (glbasic) Select
////
GLOBAL playername$ = ""

playername$ = "Nobody"
LOCAL hex$
GLOBAL msg$

hex$ = "123456789123456789,"+playername$+","+score
msg$ = ENCRYPT$("test", hex$) // After that its crashing, but only if you type 6 Letters into the Highscore. Typed: Nobody
////

----------------------------------------------------------------------------------
Code (glbasic) Select
////
GLOBAL playername$ = ""

playername$ = "Nobody"
LOCAL hex$
GLOBAL msg$

hex$ = "123456789123456789,"+playername$+","+score+",4" // Adding +",4"
msg$ = ENCRYPT$("test", hex$) // After that its crashing, but only if you type 4 Letters into the Highscore. Typed: 1234
////


It seems like a bit nonsense to me if i add more fake letters to the Variable...  :blink:
I added now: ","+score+",......"
Seems like it works now without crashing.  =D
.... Homepage ....

Slydog

#20
QuoteSo the pattern is either words beginning with 'No', or words that are 6 characters long

So, it seems that the ENCRYPT$ command has a bug that can't accept a certain number of characters.

[Edit]
I'm guessing that you could simplify your code like this:

Code (glbasic) Select
"123456789123456789,......,"+playername$+","+score
My current project (WIP) :: TwistedMaze <<  [Updated: 2015-11-25]

Gregory Atlas

#21
Quote from: Slydog on 2010-Dec-02
QuoteSo the pattern is either words beginning with 'No', or words that are 6 characters long

So, it seems that the ENCRYPT$ command has a bug that can't accept a certain number of characters.

[Edit]
I'm guessing that you could simplify your code like this:

Code (glbasic) Select
"123456789123456789,......,"+playername$+","+score

Tried that and if i type now a 7 letter Word, it crashes. Used the word 'Tornado'
I will try now something else....
.... Homepage ....

Slydog

Very strange.
What about putting about 10 more characters near the beginning of the string?
Or maybe in needs to end with a non-numeric string?
try '+ ","' again?
My current project (WIP) :: TwistedMaze <<  [Updated: 2015-11-25]

Gregory Atlas

Quote from: Slydog on 2010-Dec-02
Very strange. 
What about putting about 10 more characters near the beginning of the string?
Or maybe in needs to end with a non-numeric string?
try '+ ","' again?

I did that already above. :)
I will continue on researching this problem.   ;/
I have a theory already about it, but i need to prove it first.
.... Homepage ....

MrTAToad

That is odd - but if you find a bug in ENCRYPT$, let Gernot know :)

Gregory Atlas

Quote from: MrTAToad on 2010-Dec-03
That is odd - but if you find a bug in ENCRYPT$, let Gernot know :)
Already sended an E-Mail days ago. But he is busy i suppose :) lets just wait. As long the game works everything else is fine for me. Just something random i found out. My TODO List is getting smaller, soon i make a new update.
.... Homepage ....

Kitty Hello

I have no mail aboutan enc bug. I am sick (ill) since wednesday, already. Got a bad flu.

Gregory Atlas

First get better Kitty, relax. :)
The E-Mail i wrote you contained parts of this forum entry, i wonder why i didnt recieved an "error: e-mail wasnt sended" or something.
.... Homepage ....

Gregory Atlas

#28
Fixed it... i hope.... found out what the problem was, i hope this is it.

before:
Code (glbasic) Select
rv% = SOCK_TCPSEND(sock_cl%, msg$)
Code (glbasic) Select
rv% = SOCK_CLOSE(sock_cl%)

% <-- was the troublemaker it seems.

changed it to:
Code (glbasic) Select
rv% = SOCK_TCPSEND(sock_cl, msg$)
Code (glbasic) Select
rv% = SOCK_CLOSE(sock_cl)

I can type now Nobody without crashing.

Now i need to test it on a Windows XP Computer still.
It would be an irony if its not working there.
.... Homepage ....

Slydog

In the help file it indicates that those functions are expecting integers, so that's strange.
Your 'sock_cl' variable was declared as integer right?
If so, then leaving the '%' if fine as you really don't need them after the variable is declared.
But, great debugging!
My current project (WIP) :: TwistedMaze <<  [Updated: 2015-11-25]