Forum

> > CS2D > General > access violation - removing all items
Forums overviewCS2D overviewGeneral overviewLog in to reply

English access violation - removing all items

7 replies
To the start Previous 1 Next To the start

old access violation - removing all items

CmDark
User Off Offline

Quote
Anyway, I use a command that removes items
(I think i know how to recreate the "bug" as i stated)

Here is what i do in the command

I think it is popping up the error message
:
[Windows exception]
EXCEPTION_ACCESS_VIOLATION
:
because the time taken to do this is too much for cs2d to handle.....


for itemid = 1,999999 do
     parse("removeitem "..itemid)
end

Any ideas?

Of course, Other than not using such a big amount
(999999)
I won't accept that idea.

old Re: access violation - removing all items

TheLetterP
COMMUNITY BANNED Off Offline

Quote
CmDark has written
Anyway, I use a command that removes items
(I think i know how to recreate the "bug" as i stated)

Here is what i do in the command

I think it is popping up the error message
:
[Windows exception]
EXCEPTION_ACCESS_VIOLATION
:
because the time taken to do this is too much for cs2d to handle.....


for itemid = 1,999999 do
     parse("removeitem "..itemid)
end

Any ideas?

Of course, Other than not using such a big amount
(999999)
I won't accept that idea.

thats because it doesn't exceed 255.
I would just do it towards 88/90.

old Re: access violation - removing all items

DC
Admin Off Offline

Quote
it's not the type ID but a unique ID for each item instance on the map. it can exceed 255. It is a short value, (256^2)-1 which equals 65535.

Maybe this value is already low enough to make it work.

there is a much better solution anyway:
item(0,"table") returns a table containing all IDs of items on the map. you just have to remove every item in this table.
1
2
3
4
itemtable=item(0,"table")
for i=1,#itemtable do
	parse("removeitem "..itemtable[i]) 
end
(untested)
edited 1×, last 28.02.10 12:28:20 pm
To the start Previous 1 Next To the start
Log in to replyGeneral overviewCS2D overviewForums overview