Raised This Month: $ Target: $400
 0% 

[small]Help with 1st plugin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
DotPT
Member
Join Date: Feb 2009
Old 03-08-2009 , 16:27   [small]Help with 1st plugin
Reply With Quote #1

I feel like crap for posting such a simple error.

I started learning Pawn language a few hours ago and i have tried to do my best in a first plugin:
-0.1 version i sucessfully made it to print a chat message 4.0 seconds after a client when he connects to the server.
-Now for the next version i want to make a HUD Message. I got an error.


Here is the code:

PHP Code:
#include <amxmodx>
#include <amxmisc>
#define PLUGIN_NAME "Welcome Message"
#define PLUGIN_VERSION "0.5"
#define PLUGIN_AUTHOR "Dotcom"


public plugin_init()   // function to register the plugin
{
    
register_plugin (PLUGIN_NAMEPLUGIN_VERSIONPLUGIN_AUTHOR)        
}

public 
client_putinserver(id)  // fuction to register that the user has entered the server
{
    
set_task(5.0"print_msg"id
    
set_task(15.0"hud_msg"id)
}

public 
print_msg(id)  // function to print a message
{
    
client_print(idprint_chat"Welcome, this is my first plugin")

public 
hud_msg(id)
    
set_hudmessage(02550, -1.0, -1.0)
    
show_hudmessage(id"hey world!")

And the error:

Code:
Error: Symbol already defined: "show_hudmessage" on line 25
As this is more like a spam thread, i'll use it for any more help i need. Thanks!
DotPT is offline
 



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


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