Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: eVOLVE on Mon 26/05/2003 16:06:08

Title: Weird Q: Int to String
Post by: eVOLVE on Mon 26/05/2003 16:06:08
Okay, this is a pretty weird and obscure question, but I'm just knackered right now and can't handle any more coding myself, trying to find the solution to one annoying problem. Basically I've got a number as an int and I want to convert it to a string so that I can read the final digit of the number, but I can't for the life of me work out how to do it. There's a command that will convert strings to ints but I can't find one to do the other way around. I tried a simple a = b; command, but it didn't like it.

Anyone got any ideas? :) Thanks...
Title: Re:Weird Q: Int to String
Post by: Pumaman on Mon 26/05/2003 16:37:19
string buffer;
int number;

StrFormat (buffer, "%d", number);
Title: Re:Weird Q: Int to String
Post by: eVOLVE on Thu 29/05/2003 17:01:15
Thanks :) Didn't get it earlier because this damn board has stopped sending me notifications of new posts >:(