new "type function" works but... Please help
Posted:
Thu Mar 11, 2010 6:47 pm
by Hblade
Hey. I broke down the code so you dont have to read a buncha stuff, but okay... This is my commands:
- Code: Select all
void Type(const char *message, ...)
{
sprintf(text, message);
}
Now when you do this:
Type("Message, %d", x);
or even another variable, it works but... the numbers always come up to this:
26265352
Any ideas on how to fix this?
Re: new "type function" works but... Please help
Posted:
Fri Mar 12, 2010 2:35 pm
by Hblade
Not what I ment, bee :3 How would you be able to implament the same functionality as the "sprintf" command? In other words, the " ... " in the code works but when ever ANY variable is displayed, it displays the numbers " 26265352 ". I have fixed this but it limits the ammounts of variable numbers you can display. So in other words, if you do this:
" Type("X Position: %d", x); "
x will say " 26265352 ". No matter what. Even if you make a new variable. I think the reason is is because of the fact that it automatically displays the maximum ammount of text characters in that string. But I dont know of any methods to work this out.
Re: new "type function" works but... Please help
Posted:
Fri Mar 12, 2010 3:40 pm
by Bee-Ant
Oh...
I have never done this before.
Why dont you use regular sprintf?
Re: new "type function" works but... Please help
Posted:
Sun Mar 14, 2010 4:21 am
by Hblade
Because I plan to have it type out