There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
acer audio black screen boot bsod computer connection crash css dell display driver drivers email error ethernet excel explorer firefox firefox 3 game hard drive internet internet explorer itunes laptop lcd linux malware network networking nvidia outlook outlook 2003 outlook express partition printer problem router slow software sound trojan usb video virus vista windows windows xp wireless
Software Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Software Development >
Solved: Unreachable statement?


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
redivivus's Avatar
Senior Member with 1,458 posts.
 
Join Date: Mar 2006
Experience: 8th hindu reincarnation -- Praise Allah
04-Aug-2006, 05:43 AM #1
Solved: Unreachable statement?
Hi......

I have no clue what the error message 'unreachable statement' is supposed to mean, but i keep getting it and cannot get rid of it without deleting these 2 statements. The error is given for the red line...

Code:
    ...
    findtarg(0);
    ...

    protected void findtarg(int x)
    {
        int i;
        int j;
        tpx = 0;
        tpy = 0;
        for(i=1;1<256;i++)
        {
            for(j=1;j<256;j++)
            {
                if(getNk(idxy[i][j]) == targ)
                {
                    tpx = i;
                    tpy = j;
                    break;
                }
            }
        }
        
        if(x == 0 && tpx > 0)
        {
            tpv = true;
            mM = true;
            mvl = true;
            sendtp();
            mM = false;
            setWaitMode(null);
            gst = 3;
            SendCom('k');
        }else
        if(x > 0 && tpx > 0)
        {
        }
    }
Any ideas?
GCDude's Avatar
Senior Member with 400 posts.
 
Join Date: Apr 2005
Location: Brighton, UK
Experience: Possibly Competent
04-Aug-2006, 11:12 AM #2
for(i=1;1<256;i++)

should be

for(i=1;i<256;i++)

AGCurry's Avatar
Senior Member with 431 posts.
 
Join Date: Jun 2005
Location: Kansas City area
Experience: advanced but learning
04-Aug-2006, 01:39 PM #3
Wow, GCDude, good catch. I looked at thing for 10 minutes and couldn't see the problem.
redivivus's Avatar
Senior Member with 1,458 posts.
 
Join Date: Mar 2006
Experience: 8th hindu reincarnation -- Praise Allah
04-Aug-2006, 03:10 PM #4
YEA man thanks lol. I also couldnt see that.
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 11:12 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.