You should check to make sure event isn't a NULL pointer before continuing.
On Fri, Jun 6, 2008 at 11:28 AM, Adam Buckland <[EMAIL PROTECTED]>
wrote:
> Hey Guys
>
> I'm currently creating a power system for a mod, and when the power reaches
> zero, I want to fire a game event to deactivate the players weapons.
>
> Currently, I create an event on the server-side, and I have a listener on
> the client-side.
>
> The server crashes when I SetInt (presumably to a null pointer), and I
> can't
> see why, since the event and userid short is defined in modevents.res
>
> Can anyone help please?
>
> Here's the code:
>
>
> if (m_iPower == 0)
> {
> IGameEvent *event =
> gameeventmanager->CreateEvent("player_deactivate");
> event->SetInt("userid",GetUserID());
> gameeventmanager->FireEvent(event);
> DevMsg("sent");
> }
> _______________________________________________
> 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