Modifying Entities
Code:
I just cannot figure this out...Because entid and ent[id] should both be able to store a number. The index out of bounds error is most likely being cause by the ent[id], I cannot explain why.[/small] |
I doubt if you can initialize arrays like that:
Code:
Code:
Code:
|
you can.
Index out of bounds means that if you have an array ent[33] and you do ent[35] then your reaching out of bounds. So check your id's to make sure there <33 |
ENT id's are 1 - 1100
player idea's are 1 - 32 |
I still dont understand,
lets say the ent is 555, and id is 7 id = 7 ent[7] = 555 ent = 555 I don't see a problem |
Check to see if id is something higher than 32.
|
Code:
set_task(3.0,"delEnt",id) |
that has worked for me countless other times unless I am doing something wrong...
and I printed out the ID in the delEnt function..it turns out be some crazy number like 34550 or something.. |
Ok, I have solved this by putting ID in an array. But what does he mean by setting task id?
|
theres no problem with setting the task id same as user id, because the function that you are calling will have the task id as its argument. So your good there. But like me and Suzuka said, you were inserting something higher > 32 into your array.
|
| All times are GMT -4. The time now is 16:36. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.