SA-MP Forums Archive
ERROR 28 ? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: ERROR 28 ? (/showthread.php?tid=345707)



ERROR 28 ? - Azazelo - 26.05.2012

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 ?


Re: ERROR 28 ? - Azazelo - 26.05.2012

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


Re: ERROR 28 ? - JaTochNietDan - 26.05.2012

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


Re: ERROR 28 ? - Azazelo - 26.05.2012

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
}