In response to Wizkidd0123
|
|
But it works for the one's place, just not then tens/hundreads.
|
In response to Hell Ramen
|
|
Ungh, I don't like doing this...but...
Bring Up My Post |
In response to Hell Ramen
|
|
Sorry, but would you mind posting the snippet in its current state? I'd really rather not search through all these messages to find it, and it would be nice to have it as a reference for a reply :)
|
In response to Igmolicious
|
|
To add to Igmolicous's post, state the current problem in some detail please.
|
In response to DeathAwaitsU
|
|
mob/proc/rupyupdate() It outputs the HUD numbers as 001 002 003 004 005 006 007 008 009 00 01 02 etc. |
In response to Hell Ramen
|
|
Alrighty, I believe I see part of the problem. With copytext, you're probably just wanting to capture a single character for the icon_state, so for one, use:
mob/proc/rupyupdate() |
In response to Igmolicious
|
|
Now it goes reverse:
001 002 003 004 005 006 007 008 009 001 011 021 etc. Thanks so far. |
In response to Hell Ramen
|
|
And what excatly is the problem?
|
In response to DeathAwaitsU
|
|
It's increasing by ones the whole time...
|
In response to Hell Ramen
|
|
Ok, we're gonna do something a bit different for your number parsing. This text string thing is evil.
mob/proc/rupyupdate() |
In response to Igmolicious
|
|
_>Could you please explain that? I don't like code I don't understand. @_@ |
In response to Hell Ramen
|
|
Hell Ramen wrote:
_>Could you please explain that? I don't like code I don't understand. @_@ Basically, A % B returns the remainder of A/B. Read its DM Ref entry for more info. The erason he's using var//bum to represent src.rupies is so that he can mess with num all he wants, but not have to completely destroy src.rupies. |
In response to Hell Ramen
|
|
Yeah, sure. Sorry, normally I try to comment everything, so it's learned from, rather than ripped. Let me say thank you, for being eager to learn things you don't understand, rather than just accepting it, and not question it.
if(num>100) |
In response to Wizkidd0123
|
|
Also, what's x2 for?
|
In response to Hell Ramen
|
|
Typo, since I grabbed it from some of one of my project's code :) My edit fixed it :) Thanks.
|
In response to Igmolicious
|
|
No, thank you. :p
[Edit] I think Wizzie was right, somehow my pixel offsets are screwing it up. o.o It does the same thing (001,002,003,004,005,006,007,008,009,00,01,02,etc.) |
Maybe this belongs at the bottom right, but this thread was getting hard to read. Now, your problem is:
obj/rupy The offsets are screwed up. Now, what we need to do is make them positive. This isn't a coding issue, but a readability/easy comprehension issue: obj/rupy So, now that we've translated it, we know that n1, n2, and n3 are each 18 pixels apart. Now, if it's coming out reversed, why not just reversing it? obj/rupy The Lesson: Readable code is do-able code. |
In response to Wizkidd0123
|
|
But, it's only becoming reversed after the ones' place is finished off, and tens' place increases.
|
In response to Hell Ramen
|
|
Hell Ramen wrote:
But, it's only becoming reversed after the ones' place is finished off, and tens' place increases. Then reverse the tens and hundreds places: obj/rupy |
No, but if the numbers are coming out backwards on-screen, while the debug messages come out forwards, then that's probably the problem.