AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   compiler error "internal error" (https://forums.alliedmods.net/showthread.php?t=17856)

MichielM 09-10-2005 12:02

compiler error "internal error"
 
when i try to compile it shut down and give the "internal error"
what am i doing wrong? just want to spawn a solid model..

Code:
public model { new ent = create_entity("info_target") entity_set_origin(ent,-576 2045 -320); entity_set_model(ent,"models/xtreme/model.mdl"); entity_set_int(ent,EV_INT_solid, 2) drop_to_floor(ent)     return PLUGIN_HANDLED }

v3x 09-10-2005 12:11

Code:
public model() {     new Float:origin[3];     origin[0] = -576.0;     origin[1] = 2045.0;     origin[2] = -320.0;     new ent = create_entity("info_target");     entity_set_origin(ent,origin);     entity_set_model(ent,"models/xtreme/model.mdl");     entity_set_int(ent,EV_INT_solid, 2);     drop_to_floor(ent);     return PLUGIN_HANDLED; }

MichielM 09-10-2005 13:18

tnx, error is gone.. but cant see the model. also there's no space where i cant walk true (if it would be invisible)
are u sure this is the correct way to spawn a model?

XxAvalanchexX 09-10-2005 15:33

entity_set_model and entity_set_string(ent,EV_SZ_model,...) actually do two different things, try both. Also, if you want it to be solid you'll have to set a bounding box via EV_VEC_mins and EV_VEC_maxs.

MichielM 09-10-2005 16:02

Then it should look like this?
also how do these mins and max work? how do i know these values??
please notice me if i'm doing it wrong
Code:
public model() {     new Float:origin[3];     origin[0] = -576.0;     origin[1] = 2045.0;     origin[2] = -320.0;     new ent = create_entity("info_target");     entity_set_origin(ent,origin);     entity_set_string(ent,EV_SZ_classname,"ts_model");     entity_set_model(ent,"models/xtreme/model.mdl");     entity_set_int(ent,EV_INT_solid, 2);     new Float:maxs[3] = {16.0,16.0,36.0}     new Float:mins[3] = {-16.0,-16.0,-36.0}     entity_set_size(ent,mins,maxs)     drop_to_floor(ent);     return PLUGIN_HANDLED; }


All times are GMT -4. The time now is 14:19.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.