Game editor crashes, AND this glitch Resolved*

Non-platform specific questions.

Game editor crashes, AND this glitch Resolved*

Postby Hblade » Sun Aug 16, 2009 4:23 pm

Fixed
Last edited by Hblade on Sun Aug 16, 2009 6:34 pm, edited 1 time in total.
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Game editor crashes, AND this glitch

Postby Bee-Ant » Sun Aug 16, 2009 6:14 pm

The max array of char is 256.
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: Game editor crashes, AND this glitch

Postby Hblade » Sun Aug 16, 2009 6:19 pm

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
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron