ALERT!
Click here to register with a few steps and explore all our cool stuff we have to offer!
Home
Upgrade
Credits
Help
Search
Awards
Achievements
 2788

Using snprintf

by XeChris - 03-06-2018 - 11:12 PM
#1
hopefully some one is able to help me with this but im having issues with using snprintf. basically what happens is that when i got to inject my menu and load a option that uses snprintf inside it will shut my xbox off. 

for example i was testing to see if it was the snprintf causing the xbox shut down and it was.

im 99.9% this below is correct and is how i've been doing it for months but i've never once found myself in this position where it freezes my xbox..

void testSNPRINTF(char* blah){
char test[100];
snprintf(test, sizeof(test), "%s test", blah);
textDraw(test, 0, 0.5, 0.2, 0.3, 0.3, 255, 255, 255, 255);
}

if anyone is able to help id appreciate it :)
Reply
#2
Just use sprintf is simplier and works flawless for me.
Reply
#3
(03-06-2018 - 11:29 PM)Comeback Wrote: Just use sprintf is simplier and works flawless for me.

i've also used sprintf and the same outcome happens. I just wish i knew why it did this.
Reply
#4
int snprintf(char *buffer, size_t len, const char *fmt, ...)
{
va_list args;
int i;

va_start(args, fmt);
i = vsnprintf(buffer, len, fmt, args);
va_end(args);
return i;
}

that's my snprintf




              
Fire    ??????? ????  Fire
Reply

Users browsing: 1 Guest(s)