Bee-Ant wrote:The max array of char is 256.
void TypeMessage(char *message, double speed)
{
if (messagecomplete == 0)
{
strncpy(text, message, i);
framecount = framecount + 1;
if (framecount >= speed)
{
i++;
if (i<strlen(message))
{
PlaySound2("C:\\Users\\Craig.Craig2-PC\\Desktop\\Summon\\WTF\\data\\typing sound.wav", 0.422222, 1, 0.000000);
}
framecount = 0;
}
if (i>strlen(message))
{
messagecomplete = 1;
}
}
if (messageclear == 1)
{
strncmp(text, message, 0);
strncpy(text, message, 0);
i = 0;
messageclear = 0;
}
}
Users browsing this forum: No registered users and 1 guest