Raised This Month: $ Target: $400
 0% 

Crash on entity creation


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Obbin
Senior Member
Join Date: Mar 2005
Location: 192.168.1.3
Old 07-10-2006 , 16:01   Crash on entity creation
Reply With Quote #1

When I create a entity like this it's fine:

Code:
    client_print(id, print_chat, "Created ent")     new ent = create_entity("info_target")     entity_set_string(ent,EV_SZ_classname,"TeleCity")     entity_set_model(ent,"models/player/arctic/arctic.mdl")     entity_set_origin(ent,origin)     entity_set_int(ent, EV_INT_solid, SOLID_BBOX)     entity_set_int(ent, EV_INT_movetype, MOVETYPE_FLY)     new Float:mina[3]     mina[0]=MINUS_ORIGIN     mina[1]=MINUS_ORIGIN     mina[2]=MINUS_ORIGIN     new Float:maxa[3]     maxa[0]=PLUS_ORIGIN     maxa[1]=PLUS_ORIGIN     maxa[2]=PLUS_ORIGIN     entity_set_size(ent,mina,maxa)

But when I comment out the model setting it crashes:

Code:
    client_print(id, print_chat, "Created ent")     new ent = create_entity("info_target")     entity_set_string(ent,EV_SZ_classname,"TeleCity")     //entity_set_model(ent,"models/player/arctic/arctic.mdl")     entity_set_origin(ent,origin)     entity_set_int(ent, EV_INT_solid, SOLID_BBOX)     entity_set_int(ent, EV_INT_movetype, MOVETYPE_FLY)     new Float:mina[3]     mina[0]=MINUS_ORIGIN     mina[1]=MINUS_ORIGIN     mina[2]=MINUS_ORIGIN     new Float:maxa[3]     maxa[0]=PLUS_ORIGIN     maxa[1]=PLUS_ORIGIN     maxa[2]=PLUS_ORIGIN     entity_set_size(ent,mina,maxa)

Why?
__________________
Sig(h)!
Obbin is offline
karlos
Veteran Member
Join Date: Apr 2004
Location: Germany/Poland
Old 07-10-2006 , 16:27   Re: Crash on entity creation
Reply With Quote #2

try commenting out EV_INT_solid and/or movetype
and setting them later

i had problems with them too
__________________
alias White Panther
karlos is offline
Obbin
Senior Member
Join Date: Mar 2005
Location: 192.168.1.3
Old 07-11-2006 , 06:53   Re: Crash on entity creation
Reply With Quote #3

Quote:
Originally Posted by karlos
try commenting out EV_INT_solid and/or movetype
and setting them later

i had problems with them too
Later?
You mean with a task or what?
__________________
Sig(h)!
Obbin is offline
karlos
Veteran Member
Join Date: Apr 2004
Location: Germany/Poland
Old 07-11-2006 , 07:07   Re: Crash on entity creation
Reply With Quote #4

yes with a task
__________________
alias White Panther
karlos is offline
Obbin
Senior Member
Join Date: Mar 2005
Location: 192.168.1.3
Old 07-12-2006 , 08:08   Re: Crash on entity creation
Reply With Quote #5

Hmm.. it still crashes when i get close to it =/
If anyone could provide me with a transparent, very small model I'd be grateful!
__________________
Sig(h)!
Obbin is offline
Rolnaaba
Veteran Member
Join Date: May 2006
Old 07-10-2006 , 16:28   Re: Crash on entity creation
Reply With Quote #6

EDIT: nevermind karlos answered you
__________________
DO NOT PM me about avp mod.

Last edited by Rolnaaba; 07-10-2006 at 16:30.
Rolnaaba is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 07-10-2006 , 16:32   Re: Crash on entity creation
Reply With Quote #7

Also, if the entity isn't able to be created for whatever reason, hault the function:
Code:
new ent = create_entity("info_target") if(!ent)   return PLUGIN_HANDLED // use whatever return necessary
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 07-12-2006 , 12:27   Re: Crash on entity creation
Reply With Quote #8

Use shell.mdl.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
karlos
Veteran Member
Join Date: Apr 2004
Location: Germany/Poland
Old 07-12-2006 , 13:36   Re: Crash on entity creation
Reply With Quote #9

i experienced crashes when setting null.mdl ( empty models ) and then looking at it
but only with players, not entities
__________________
alias White Panther
karlos is offline
Obbin
Senior Member
Join Date: Mar 2005
Location: 192.168.1.3
Old 07-12-2006 , 15:25   Re: Crash on entity creation
Reply With Quote #10

I solved it using one of the HighFPS models
__________________
Sig(h)!
Obbin is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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