Getting string data from integer variable

Non-platform specific questions.

Postby Troodon » Thu May 31, 2007 4:56 pm

Your code isn't working.
When I click 'save' it makes all the files 0.
I'll send you the files in your email now.
:)
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Postby Sgt. Sparky » Thu May 31, 2007 4:57 pm

okay, I may have to wait untill later to look at them because I must leave Very Soon,
VERY soon.(5 mins or less)
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby Troodon » Thu May 31, 2007 4:58 pm

No problem. 8)
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Postby Sgt. Sparky » Thu May 31, 2007 4:59 pm

just e-mail em' and I will look at them later, I am leaving right this instant. :(
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby Troodon » Thu May 31, 2007 5:00 pm

They are already in your inbox.
My postmen are moving at the speed of electrons. :lol:
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Postby Sgt. Sparky » Fri Jun 01, 2007 12:44 am

Code: Select all
loadVars("kirjasto", "l33tfile");
kirjasto[place.textNumber] = input_data.textNumber;
saveVars("kirjasto", "l33tfile");
tulostus.textNumber =  kirjasto[0];
tulostus2.textNumber = kirjasto[1];
tulostus3.textNumber = kirjasto[2];
tulostus4.textNumber = kirjasto[3];
tulostus5.textNumber = kirjasto[4];
tulostus6.textNumber = kirjasto[5];
tulostus7.textNumber = kirjasto[6];
tulostus8.textNumber = kirjasto[7];
tulostus9.textNumber = kirjasto[8];
tulostus10.textNumber = kirjasto[9];

:D
that is the code you must use. :D
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby Troodon » Fri Jun 01, 2007 9:32 am

Sparky, did you tried that code?
Because for me it can save numbers but not any text data. Not even a single letter. :?

EDIT:
Wait, I spotted something. I had an idea...

EDIT2:
Nope. My variable's save and group are the same name l33tfile so I tried to re-change it to "l33tfile", "l33tfile" instead of "kirjasto", "l33tfile". However it didn't work.
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Postby Sgt. Sparky » Fri Jun 01, 2007 3:11 pm

tekdino wrote:Nope. My variable's save and group are the same name l33tfile so I tried to re-change it to "l33tfile", "l33tfile" instead of "kirjasto", "l33tfile". However it didn't work.

it needs to be "kirjasto" "i33file" otherwise it will not work.
:(
(and yes, I did try the code.)

EDIT: your code does not have any type of name saving.
(just numbers)
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby Troodon » Fri Jun 01, 2007 3:17 pm

Where the text saving disappeared!?
The number saving worked normally before I posted this topic. All I need is to save text.
:cry:
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Postby Sgt. Sparky » Fri Jun 01, 2007 3:34 pm

!!! oi !!! :lol:
okay,
now change kirjasto to string and use this code:
Code: Select all
loadVars("kirjasto", "l33tfile");
strcpy(kirjasto[place.textNumber], input_data.text);
saveVars("kirjasto", "l33tfile");
strcpy(tulostus.text, kirjasto[0]);
strcpy(tulostus2.text, kirjasto[1]);
strcpy(tulostus3.text, kirjasto[2]);
strcpy(tulostus4.text, kirjasto[3]);
strcpy(tulostus5.text, kirjasto[4]);
strcpy(tulostus6.text, kirjasto[5]);
strcpy(tulostus7.text, kirjasto[6]);
strcpy(tulostus8.text, kirjasto[7]);
strcpy(tulostus9.text, kirjasto[8]);
strcpy(tulostus10.text, kirjasto[9]);

:D
(it may come up with suspicious pointer somthing, accept it. :))
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby Troodon » Fri Jun 01, 2007 3:41 pm

Weird, it doesn't work. But this time it doesn't give me error messages.
:wink: Do you still have my files on your hard disc?
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Postby Sgt. Sparky » Fri Jun 01, 2007 3:43 pm

yes, lemme' look it over again. :D
(I have not deleted it because I thought there might be somthing you still want to do with it.)
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby Troodon » Fri Jun 01, 2007 3:57 pm

Thanks! :D
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Postby Sgt. Sparky » Fri Jun 01, 2007 4:04 pm

Code: Select all
loadVars("kirjasto", "l33tfile");
strcpy(kirjasto[place.textNumber], input_data.text);
saveVars("kirjasto", "l33tfile");
strcpy(tulostus.text, kirjasto[0]);
strcpy(tulostus2.text, kirjasto[1]);
strcpy(tulostus3.text, kirjasto[2]);
strcpy(tulostus4.text, kirjasto[3]);
strcpy(tulostus5.text, kirjasto[4]);
strcpy(tulostus6.text, kirjasto[5]);
strcpy(tulostus7.text, kirjasto[6]);
strcpy(tulostus8.text, kirjasto[7]);
strcpy(tulostus9.text, kirjasto[8]);
strcpy(tulostus10.text, kirjasto[9]);

it works for me. :)
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby Troodon » Fri Jun 01, 2007 4:06 pm

It works for you??
Does the slots (0-9) chance?

Because it doesn't work for me!
:shock:

EDIT: It works when you can see the inputted text in one of the 0-9 places.
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

PreviousNext

Return to General

Who is online

Users browsing this forum: No registered users and 1 guest