Error 2 (misc_torch #4) @ (0 0 0):Â Â Invalid entity: misc_torch (no spawn function)2 entities removed (out of 5 total)
// Generated by ModelEd#define FRAME_stand_1 0#define MODEL_SCALE 1.000000
void SP_misc_torch (edict_t *ent){ ent->movetype = MOVETYPE_NONE; ent->solid = SOLID_BBOX; VectorSet (ent->mins, 0, 0, 0); VectorSet (ent->maxs, 8, 8, 16); ent->s.modelindex = gi.modelindex ("models/torch/tris.md2"); ent->s.frame = 0; gi.linkentity (ent); return;}
void SP_misc_torch (edict_t *self);
@PointClass base(Appearflags) color(128 128 128) size(0 0 0, 8 8 16) = misc_torch : "torch" []
Did you compile the game DLL without errors? Did you place it in the proper folder for your mod? If your mod is called my_mod then the gamex86.dll belongs in quake2/my_mod and you must invoke the game with a command line: quake2.exe +set game my_mod ...
The spawn function also needs to be registered in the game. Look for spawn_t spawns[] = in g_spawn.c and add{"misc_torch", SP_misc_torch},
I might also suggest that depending on what you are trying to accomplish, if you want to make your changes more portable and easier for mappers to take advantage of, you could just replace the minelight model which is a 1 frame model attached to an object that creates it's own light.
There is not much I can help you with then, since you know so much about what you are doing. ERRORS will stop proper compliation, warnings will not. As long as you get a good DLL you don't need the EXE. VC2008 will warn about unsafe library functions but you can ignore those. The missing dsound.h and other errors than prevent you from getting a good .exe and perhaps the ref_gl.dll are because you have not installed the DX9 SDK.The spawn function also needs to be registered in the game. Look for spawn_t spawns[] = in g_spawn.c and add{"misc_torch", SP_misc_torch},to the list you find there. This will point to the proper spawn function when your entity is used. Don't forget to add the prototype to the list above the spawns list.
Quote from: QwazyWabbit on December 28, 2010, 01:49:18 AMThere is not much I can help you with then, since you know so much about what you are doing. ERRORS will stop proper compliation, warnings will not. As long as you get a good DLL you don't need the EXE. VC2008 will warn about unsafe library functions but you can ignore those. The missing dsound.h and other errors than prevent you from getting a good .exe and perhaps the ref_gl.dll are because you have not installed the DX9 SDK.The spawn function also needs to be registered in the game. Look for spawn_t spawns[] = in g_spawn.c and add{"misc_torch", SP_misc_torch},to the list you find there. This will point to the proper spawn function when your entity is used. Don't forget to add the prototype to the list above the spawns list.read the posts before that more closely..... I did that already like 2 days before posting this topic