ERROR 28 ?
#1

error 028: invalid subscript (not an array or too many subscripts)

First time see this , what are possible solution for this error?

Quote:

stock comand1() // this work
{
//some code
}
stock comand2()
{
//some code //this work
comand1();//error 028
}

i try to change but same error

Quote:

stock comand1() // this work
{
//some code
}
stock comand2()//this work
{
//some code
}

//Public OnPlayer
public OnPlayerCommandText(playerid,cmdtext[])
{
if(!strcmp(cmdtext,"/mycommand",true))
{
comand1();
comand2();//error 028

return 1;
}
return 0;
}


and i try this and it make no sense

Quote:

stock comand1() // this work
{
//some code
}
stock comand2()//this work
{
//some code
}

//Public OnPlayer
public OnPlayerCommandText(playerid,cmdtext[])
{
if(!strcmp(cmdtext,"/mycommand",true))
{
comand2();
comand1(); //error 028

return 1;
}
return 0;
}

Did i extend limit of stock func ?? Is there a limit of maximum stock func ?
Reply
#2

Thank you for help , i try this what you suggests and get this error.

error 076: syntax error in the expression, or invalid function call
Reply
#3

Can you show the actual contents of your functions? It's probably an issue with the code inside of the function.
Reply
#4

Thank you , i fix when i delete one old unused stock with no code in it. This is was a problem.
Quote:

stock comand1()
{
//working code
oldtest();
//working code
}
stock oldtest() // < THIS MAKE THIS ERROR
{
//JUST A COMENT
}

Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)