Raised This Month: $ Target: $400
 0% 

Tried many things.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
TheNewt
Donor
Join Date: Jun 2006
Location: Where I live.
Old 06-20-2006 , 19:31   Tried many things.
Reply With Quote #1

Eh, I'm at a loss once again.

I keep getting a ShowHUD error, within the game (I have debug on).
No compiling errors. Just an error in the game.

Code:
public ShowHUD(id) {     new Message[51]     format (Message, 50, "Level: %i XP: %i", g_PlayerLevel[id], g_PlayerXP[id]);     message_begin(MSG_BROADCAST, gmsgStatusText, {150,150,150}, id)     write_string(Message)     message_end() }

Code:
Plugin called message_begin with and invalid message id (0).
Run time error 10: native error (native "message_being")
[0] textmBSlsI.sma::ShowHUD (line 146)
Am I missing something?
I checked through it several times

And yeah this is based off the Animal Mod's ShowHUD... Thanks XunTric lol
TheNewt is offline
jtp10181
Veteran Member
Join Date: May 2004
Location: Madison, WI
Old 06-20-2006 , 19:39  
Reply With Quote #2

that means gmsgStatusText is 0, you need to set it up in plugin_ini
__________________
jtp10181 is offline
Send a message via ICQ to jtp10181 Send a message via AIM to jtp10181 Send a message via MSN to jtp10181 Send a message via Yahoo to jtp10181
TheNewt
Donor
Join Date: Jun 2006
Location: Where I live.
Old 06-20-2006 , 19:43  
Reply With Quote #3

Oh, set it up in the plugin_init?

Code:
    gmsgStatusText = get_user_msgid("StatusText")
tis what I have set up in the plugin_init
TheNewt is offline
jtp10181
Veteran Member
Join Date: May 2004
Location: Madison, WI
Old 06-20-2006 , 20:15  
Reply With Quote #4

i double checked the amxx source and I was right, it means that is 0. Maybe you have another var in the plugin overwriting memory and messing up that var.
__________________
jtp10181 is offline
Send a message via ICQ to jtp10181 Send a message via AIM to jtp10181 Send a message via MSN to jtp10181 Send a message via Yahoo to jtp10181
TheNewt
Donor
Join Date: Jun 2006
Location: Where I live.
Old 06-20-2006 , 20:50   Grr!
Reply With Quote #5

Gah, okay yeah I fixed it by moving the gmsgStatusText up to a higher point on the plugin_init, but it still doesn't show the XP/Levels in the HUD... >.<

-edit: NVM FIXED IT, needed to add a write_byte(0) to the message func ^_^
TheNewt is offline
Reply



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:04.


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