Hello!

I have 15 buttons on a card. They are each named Button 1, Button 2, Button 3, 
etc. I have another button that I am using as a game piece. It moves around the 
digital game board to the loc of each of the other 15 buttons. I am attempting 
to save the players information into a single line, in a text file, on the 
server. I’m using LC Server to manage the text file. Each line on the the text 
field holds the username, password, emailaddress, and player’s game piece 
button location. So a line in the text file would appear as: 
jpatten,password,[email protected],Button 2

My player piece moves across the digital game board from button loc to button 
loc, across 15 spots (button locs.) The LS Server writes the current players 
location by putting the name of the button it is over. So if the player is 
currently at Button 2, rolls a 3, their player moves to the loc of Button 5 and 
server writes Button 5 into the last item of the text entry for that player. So 
that players entry into text file becomes: 
jpatten,password,[email protected],Button 5.

The problem is when I get to buttons (game board spots) 10-15. I can tell by 
examining the code that it is exchanging, say Button 9 for Button 12 in a move 
of 3, but when it puts Button 12 in for item 4 it only writes  “Button 1,” 
leaving out the 2 in twelve. If I go around the board, to single digits, the 
code works again. 

It is only when I replace the last item with a two digit number that it fails. 
It’s as if it won’t allow the replacement of the single digit last item, Button 
9, with a two digit item, Button 12. It lops off the 2.

Does anybody have an idea of what could be going wrong? I will put my server 
code in a reply to this email, otherwise I will be put into “long message 
limbo” if I paste it to the bottom of this message.

Thank you!

John Patten
SUSD
_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to