edited 1×, last 03.10.10 06:30:30 am
Forum
Stranded II General 'Invalid OBJECT ID for BUILDING (0)'Invalid OBJECT ID for BUILDING (0)
16 replies 1
The first is the "id=" tag, and that has to be a unique ID for that building.
The second has to be a "objectid=" OR "unitid=". NOT BOTH! Just one. And the ID has to be an object or unit that currently is already defined in the scripts. This is what the "building" will turn into when you've put in all the materials to build whatever it is.
But there's something unusual about that, because the error 'Invalid OBJECT ID for BUILDING (0)' means that in one building definition, you might not have either a "unitid=" or "objectid=", that's why it's reporting the value as (0). However, this could be in ANY building, not just in the one you were working on. I missed a "script=end" on a item and that messed up the item defined after it, so I spent ages looking at the other one instead of using my mod viewer and taking care of the errors it shows. After a while, I did and it worked.
edited 1×, last 03.10.10 08:03:19 am
EDIT= it said there was an 'unhandled exception'. what do i do?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
### Shelter id=165 name=Shelter group=building icon=gfx\shelter01.bmp model=gfx\shelter01.b3d fx=16 health=100 mat=wood behaviour=cover script=start 	on:build_finish { 		event "shelterbuild",0,0; 	} script=end description=start Offers cover for sleeping description=end
Now where in hell do you see Objectid in there? You don't need to put that in thre and that is what is causing the error. See? Job done.
EDIT: Sorry that is incorrect because of how i read your code, the real problem is that the objectid needs to be below 255, otherwise it returns an error Sorry for that rant there |^|
btw phytechnic, i cant upload it because i would need permission because the base of the game is someone elses mod. im only adding my features to my own comfort.
if i did it would have to be private and you might have to delete file afterwards.
UnIdEnTiFiEd has written
i believe you are mistaken for the object. not how to build the object.
btw phytechnic, i cant upload it because i would need permission because the base of the game is someone elses mod. im only adding my features to my own comfort.
if i did it would have to be private and you might have to delete file afterwards.
btw phytechnic, i cant upload it because i would need permission because the base of the game is someone elses mod. im only adding my features to my own comfort.
if i did it would have to be private and you might have to delete file afterwards.
Could you ask the original author if I could use it purely for the improvement of the mod viewer, that would be fantastic. I would have no need to keep the mod because I'm not making one and have no intention to. My work here is clearly focused on the mod viewer and my free modelling.
@DannyDeth
That's not true. If you go into "game.inf", you will find three lines defining the maximum number of items, objects and units you can have. Items and objects can be set up to 5000, (0 based 4999), units can be set to 500.
check your messages for it
edit= @dannydeth i set it to 5000 and all my other objects are ok so really, it has nothing to do with that.
1
2
3
2
3
limit_objects=255 limit_units=100 limit_items=255
Go to your sys folder and find bulding you find for example this
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
id=1 group=building objectid=184 req=97 script=start 	unlockbuilding 4; 	unlockbuilding 5; 	unlockbuilding 6; 	unlockbuilding 7; 	unlockbuilding 9; 	unlockbuilding 28; 	unlockbuilding 29; 	unlockbuilding 36; 	unlockbuilding 38; 	unlockbuilding 39; script=end ### Shelter id=2 group=building objectid=165 req=24,20 req=15,30 script=start 	unlockbuilding 4; 	unlockbuilding 5; 	unlockbuilding 6; 	unlockbuilding 7; 	unlockbuilding 9; 	unlockbuilding 28; 	unlockbuilding 29; 	unlockbuilding 34; 	unlockbuilding 36; 	unlockbuilding 38; 	unlockbuilding 39; script=end
well lets mod the shelter there is the shelter just put there
unlock building and ID (the id is the nuimber next to unlock building)
so you put there for example: unlock building 8 than on building the shelter you can build well. The ID of buildings are at top of the list.
After makeing models or finding buildings or stuff what cant be builded you need go to editor find ID of the boject and put it in list, after that script oit on what do you need for building it othervise you get erros.
PS: to get the right id of the building just move the mouse over the icon of object and it should show you the ID of object after 3-4 seconds.
The id in the properties menu of object is incorect
UnIdEnTiFiEd has written
but i dont get whats wrong with this then
spoiler has written
### Lean-to
id=106
group=building
#objectid=4572
req=24,30
req=15,40
script=start
unlockbuilding 8;
script=end
id=106
group=building
#objectid=4572
req=24,30
req=15,40
script=start
unlockbuilding 8;
script=end
the fat marked line is where your error is. I wrote a # in front of it so this will be seen as a comment by the game but you should remove it completely to prevent confusions.
the objectid is only required in the buildings.inf file and it has to be the same ID you used for the object in the objects_*.inf file which in this case is 106.
the problem was i added a 2 here objectid=4572
when it was ment to be 4576
1