array index out of bounds
I am trying edit Ava's plugin so the new ATMS in mecklenburg work, the code i put in was
Code:
Code:
and i get array index out of bounds which is somehow being caused by the new backposA,B and C arrays, can someone please help my problem. thanks |
Re: array index out of bounds
Quote:
|
what?
what do you mean |
Edit:
x Removed by me |
v3x, do you even understand what you tell people?!
Creating an array with 5 dimensions and then using a function to compare vectors (3 dimensions) is supposed to work? |
Oh, I misread it. :|
|
Quote:
If you declare an array of 3 values, then you can only access the array with 3 indexes (namely: 0, 1, 2) But what you did is create an array of 3, and then tried accessing 6 indexes (namely: 0, 1, 2, 3, 4, 5).. look here in your code: Code:
The 'checkorigin' is only an array of 3, but you are trying to access 6 indexes.. Solution: make two different arrays of 3, or make the one array an array of 6.. :D I hope that helps.. |
A better solution would be to make some sort of system for which to lay your own NPC's, instead of hard coding coordinates, and then loading the saved NPC's on server start.
Also, it would be really cool if the NPC's moved, if you could set their model in game, tell them what to say in game, make them allsay and do and be different things, and if they were hooked into a working inventory mod. http://forums.alliedmods.net/showthread.php?t=5037 |
ok i made neworigin and origin 6 like
Code:
but it says array sizes must match AND array index is out of bounds .... |
You'll need to post more of your code so we can see whats going on..
|
| All times are GMT -4. The time now is 09:50. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.