Script stops running on this line
#1

Hi all,

Got a command to show a dialog of all vehicles. It compiles fine, but when I run the command, I get the error "UNKNOWN SERVER COMMAND" displayed in game (Or whatever it is). Anyways, ran some test and figured out that the script under the command just stops running at this line:

Код:
new models[215], labels[215][50];
It just doesn't execute any of the code after this line, and just outputs to the player "SERVER COMMAND UNKNOWN".

Any ideas whats causing this please, I'm baffled!?
Reply
#2

You have to define your 2D Array.
Reply
#3

Quote:
Originally Posted by Dayrion
Посмотреть сообщение
You have to define your 2D Array.
Hi, thanks for your input.

I believe I have defined it in that line I've posted above..no?
Reply
#4

This is an example :
PHP код:
new Int247[][] =
{
    {-
25.884498,-185.868988,1003.54687517},
    {
6.091179,-29.271898,1003.54943810},
    {-
30.946699,-89.609596,1003.54687518}
}; 
Reply
#5

Stack overflow. The normal stack size is 16 kb and you're trying to allocate almost 44 kb. Increasing the stack to 64k (#pragma dynamic 65536) might work. But then again you should ask yourself why you need such large local variables in the first place.
Reply
#6

Thats quite a big array you are trying to create, what is going to be it's purpose? because I'm perfectly sure you are looping thru these 215 and if you are looping why are you not creating a 1D array/string inside the loop?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)