Computer Science Canada Integer Conversion problem |
Author: | tjmoore1993 [ Sat May 02, 2009 5:18 pm ] | ||
Post subject: | Integer Conversion problem | ||
What is it you are trying to achieve? I want my converted value you equal the original value before conversion. What is the problem you are having? When I convert my integer to a string I get an unequal value. Example: INT Value : 100 STRING VALUE : 236 Describe what you have tried to solve this problem I know that my problem has to do with base but I do not understand it as much.
|
Author: | TheGuardian001 [ Sat May 02, 2009 6:39 pm ] | ||
Post subject: | Re: Integer Conversion problem | ||
There is no need to have the 0 or the 8 in the intstr call. The 0 refers to the width of the string, so it is probably doing nothing. The 8 means that it will output the numbers in base 8. you probably do not want base 8. simplify it by just using intstr(value) with no extra parameters. the other parameters are optional, the command will still work if you leave them out.
myString returns 100, base8 returns 144. |
Author: | tjmoore1993 [ Sat May 02, 2009 7:07 pm ] |
Post subject: | RE:Integer Conversion problem |
Thanks, I haven't actually thought about it that way. I totally forgot I can leave out parameters. Thanks for the help ![]() |
Author: | Dusk Eagle [ Sat May 02, 2009 8:45 pm ] | ||
Post subject: | Re: Integer Conversion problem | ||
Your NoRed0,1,2 etc. variables would be much better if stored in an array. Then, you could replicate your for loop in much shorter lines:
|
Author: | tjmoore1993 [ Sun May 03, 2009 10:44 am ] | ||
Post subject: | Re: Integer Conversion problem | ||
Dusk Eagle @ Sat May 02, 2009 8:45 pm wrote: Your NoRed0,1,2 etc. variables would be much better if stored in an array. Then, you could replicate your for loop in much shorter lines:
Works : ![]() |
Author: | Dusk Eagle [ Sun May 03, 2009 12:02 pm ] |
Post subject: | Re: Integer Conversion problem |
Those pictures actually look pretty good there. Did you make them? |
Author: | tjmoore1993 [ Sun May 03, 2009 1:15 pm ] |
Post subject: | Re: Integer Conversion problem |
Dusk Eagle @ Sun May 03, 2009 12:02 pm wrote: Those pictures actually look pretty good there. Did you make them?
I did not make the ground or characters. They were extracted from Maplestory's WZ archive. Most of the artwork though is mine. ![]() |