[HELP] runtime error 7: stack underflow
#1

Hello. So crashdetect says that there is runtime error 7: stack underflow in this public

Quote:

forward OdvozTimer();
public OdvozTimer()
{
for(new i; i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i))
{
if(OdvozT[i] > 0)
{
OdvozT[i] -= 1;
if(OdvozT[i] == 0)
{
SendClientMessage(i,SVIJETLOPLAVA,"Hello!");
}
}
}
}
return 1;
}

Reply
#2

Oh my God, use the indentation
PHP код:
forward OdvozTimer();

public 
OdvozTimer(){
    for(new 
ii<MAX_PLAYERSi++){
        if(
IsPlayerConnected(i)){
            if(
OdvozT[i] > 0){
                
OdvozT[i] -= 1;
                if(
OdvozT[i] == 0){
                    
SendClientMessage(i,SVIJETLOPLAVA,"Hello!");
                }
            }
        }
    }
    return 
1;

show
PHP код:
#define SVIJETLOPLAVA 
Reply
#3

Quote:
Originally Posted by AbyssMorgan
Посмотреть сообщение
Oh my God, use the indentation
PHP код:
forward OdvozTimer();
public 
OdvozTimer(){
    for(new 
ii<MAX_PLAYERSi++){
        if(
IsPlayerConnected(i)){
            if(
OdvozT[i] > 0){
                
OdvozT[i] -= 1;
                if(
OdvozT[i] == 0){
                    
SendClientMessage(i,SVIJETLOPLAVA,"Hello!");
                }
            }
        }
    }
    return 
1;

show
PHP код:
#define SVIJETLOPLAVA 
that is fine its lightblue color I don't think so that is this problem something else in the code is wrong. Also I want to mention when I compile gamemode I get no errors it's clean compile. Thanks
Reply
#4

nothing in the code is wrong, show definitions
PHP код:
#define SVIJETLOPLAVA 
Reply
#5

It's not that I check that already. But here you go:

#define SVIJETLOPLAVA 0x33CCFFAA
Reply
#6

There is no error in the code

you have so:
new OdvozT[MAX_PLAYERS];
Reply
#7

Where is OdvozT set?
Reply


Forum Jump:


Users browsing this thread: