Page 1 of 1

Game editor crashes, AND this glitch Resolved*

PostPosted: Sun Aug 16, 2009 4:23 pm
by Hblade
Fixed

Re: Game editor crashes, AND this glitch

PostPosted: Sun Aug 16, 2009 6:14 pm
by Bee-Ant
The max array of char is 256.

Re: Game editor crashes, AND this glitch

PostPosted: Sun Aug 16, 2009 6:19 pm
by Hblade
Bee-Ant wrote:The max array of char is 256.

I know I fixed that part, the problem is, well here look at my new code
Code: Select all
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;
    }
}

How can I get the message to erase before it types the next message? If I can find this out MAYBE it will stop glitching out, idk but anyways it glitches and sometimes the message dosnt apear at all