As Peter87 asked, what types are your variables? Also, could you possibly separate your operators for their operands? i.e. bphp=bphp-i; to bphp = bphp - i;. It just makes it easier on the eyes is all.
And also use code tags please (Hint: they are the <> under format off to the right when replying). But we need more information like your types ect. could you post your whole project or the parts the are related to the error?
Well really we cant tell you anything from the code you posted what went wrong. There is nothing wrong with the code you posted so (except some minor things but nothing that will give a error that I can see) we need some more.
One minor thing I saw is that your are using goto this is not good except in a select few instances which rarely happen. So I would recommend using a different way to control the flow of your program then goto's because they will cause you more problems then they are worth. Especially if your program is huge like you say then you are going to be in hell when you debug.
Thats all I can help with without more information or more code, but maybe someone else can help you.