What I am doing is creatting a model entity when the /game/ creates the player. I then pass a pointer to the player to the model entity. I need it to get coordinates. I found the problem. I was passing a pointer from the class in player.cpp. I needed to use the hl2mp player for the pointer.
Best regards, Dan http://www.lnxmad.com Jonas 'Sortie' Termansen wrote: > If you're getting crashes like that, you most likely used a nullpointer. Try > use EHandles perhaps. Are you sure you want to be creating your own players > and not let the game handle that? What exactly are you trying to do, and > what code are you using to do that? > > ----- Original Message ----- > From: "Dan Clark" <lnx...@gmail.com> > To: "Discussion of Half-Life Programming" <hlcoders@list.valvesoftware.com> > Sent: Friday, March 20, 2009 9:18 PM > Subject: Re: [hlcoders] Model Entity > > > >> How can I get a pointer to the player to a model entity. as of now i >> made a function that passes the player from the player class when it >> makes it. When I try to get a value from the player it crashes with a >> access violation 0x00000005 >> >> Best regards, >> Dan >> http://www.lnxmad.com >> >> >> >> Jonas 'Sortie' Termansen wrote: >> >>> Well, what value of className are you passing onto the function? >>> >>> ----- Original Message ----- >>> From: "Dan Clark" <lnx...@gmail.com> >>> To: "Discussion of Half-Life Programming" >>> <hlcoders@list.valvesoftware.com> >>> Sent: Friday, March 20, 2009 7:15 PM >>> Subject: [hlcoders] Model Entity >>> >>> >>> >>> >>>> I am trying to create a model entity for a mp mod. Do I put it in shared >>>> mp or just server dir? When I create to cpp and h files everything >>>> compiles but when I created the entity it returns null: >>>> >>>> >>>> IServerNetworkable *pNetwork = EntityFactoryDictionary()->Create( >>>> className ); >>>> g_pForceAttachEdict = NULL; >>>> >>>> if ( !pNetwork ) >>>> return NULL; >>>> >>>> >>>> It always returns null and I get a message in game: Attempted to create >>>> unknown entity type: >>>> >>>> -- >>>> Best regards, >>>> Dan >>>> http://www.lnxmad.com >>>> >>>> >>>> _______________________________________________ >>>> To unsubscribe, edit your list preferences, or view the list archives, >>>> please visit: >>>> http://list.valvesoftware.com/mailman/listinfo/hlcoders >>>> >>>> >>>> >>> _______________________________________________ >>> To unsubscribe, edit your list preferences, or view the list archives, >>> please visit: >>> http://list.valvesoftware.com/mailman/listinfo/hlcoders >>> >>> >>> >> _______________________________________________ >> To unsubscribe, edit your list preferences, or view the list archives, >> please visit: >> http://list.valvesoftware.com/mailman/listinfo/hlcoders >> >> > > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list archives, please > visit: > http://list.valvesoftware.com/mailman/listinfo/hlcoders > > _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders