Raised This Month: $ Target: $400
 0% 

help me figure out what i did wrong with this plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
randitobandito
Junior Member
Join Date: Mar 2006
Old 03-12-2006 , 12:05   help me figure out what i did wrong with this plugin
Reply With Quote #1

so i got most of the source from someone on the forums posting to help someone who needed a sound plugin, then i modified it to fit my needs. when i use the online compiler i get this error

Code:
/home/users/amxmodx/tmp3/textM4HpeQ.sma(1) : error 013: no entry point (no public functions)
can you guys help me? lemme know if i need to post my souce
__________________

oh him? hes just a ninja, i keep him for when the pirates attack.
randitobandito is offline
Send a message via AIM to randitobandito
randitobandito
Junior Member
Join Date: Mar 2006
Old 03-12-2006 , 12:11  
Reply With Quote #2

meh, i decided just to post the source to aid the coding gods (you guys) in helping me.

Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plugin"
#define VERSION "1.0"
#define AUTHOR "randitobandito"


public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	// Add your code here...
}#include <amxmodx>
#include <amxmisc>

public plugin_init() 
{ 
    register_plugin("Sounds", "1.0","randitobandito")
    register_clcmd("say", "handle_say")
    register_clcmd("say_team", "handle_say")
} 

public plugin_precache()
{ 
    precache_sound("sounds/randysmusicmod/lol.mp3")
    precache_sound("sounds/randysmusicmod/techno.mp3") 
    precache_sound("sounds/randysmusicmod/omg.wav") 
    precache_sound("sounds/randysmusicmod/rock.mp3") 
    precache_sound("sounds/randysmusicmod/fuck.wav") 
    precache_sound("sounds/randysmusicmod/noob.wav") 
    precache_sound("sounds/randysmusicmod/stfu.wav")
} 

public handle_say(id) 
{ 
    new Text[32] 
    read_args(Text, 31)    

    remove_quotes(Text)

    if(equali(Text, "lol")) 
         client_cmd(0, "spk sounds/randysmusicmod/lol.mp3") 

    if(equali(Text, "techno")) 
         client_cmd(0, "spk sounds/randysmusicmod/techno.mp3") 

    if(equali(Text, "omg")) 
         client_cmd(0, "spk sounds/randysmusicmod/omg.wav") 

    if(equali(Text, "rock")) 
         client_cmd(0, "spk sounds/randysmusicmod/rock.mp3") 

    if(equali(Text, "fuck")) 
         client_cmd(0, "spk sounds/randysmusicmod/fuck.wav") 

    if(equali(Text, "noob")) 
         client_cmd(0, "spk sounds/randysmusicmod/noob.wav")
	 
    if(equali(Text, "noob")) 
         client_cmd(0, "spk sounds/randysmusicmod/stfu.wav")

return PLUGIN_HANDLED 
}
__________________

oh him? hes just a ninja, i keep him for when the pirates attack.
randitobandito is offline
Send a message via AIM to randitobandito
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 03-12-2006 , 12:11  
Reply With Quote #3

post the plugin...how are we suposed to help if we cant even see what u did wrong?
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
randitobandito
Junior Member
Join Date: Mar 2006
Old 03-12-2006 , 12:12  
Reply With Quote #4

Quote:
Originally Posted by SweatyBanana
post the plugin...how are we suposed to help if we cant even see what u did wrong?
posted it
__________________

oh him? hes just a ninja, i keep him for when the pirates attack.
randitobandito is offline
Send a message via AIM to randitobandito
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 03-12-2006 , 12:12  
Reply With Quote #5

first off u have 2 public plugin inits.
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 03-12-2006 , 12:15  
Reply With Quote #6

Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> public plugin_init() {     register_plugin("Sounds", "1.0","randitobandito")     register_clcmd("say", "handle_say")     register_clcmd("say_team", "handle_say") } public plugin_precache() {     precache_sound("sounds/randysmusicmod/lol.mp3")     precache_sound("sounds/randysmusicmod/techno.mp3")     precache_sound("sounds/randysmusicmod/omg.wav")     precache_sound("sounds/randysmusicmod/rock.mp3")     precache_sound("sounds/randysmusicmod/fuck.wav")     precache_sound("sounds/randysmusicmod/noob.wav")     precache_sound("sounds/randysmusicmod/stfu.wav") } public handle_say(id) {     new Text[32]     read_args(Text, 31)       remove_quotes(Text)     if(equali(Text, "lol"))          client_cmd(0, "spk sounds/randysmusicmod/lol.mp3")     if(equali(Text, "techno"))          client_cmd(0, "spk sounds/randysmusicmod/techno.mp3")     if(equali(Text, "omg"))          client_cmd(0, "spk sounds/randysmusicmod/omg.wav")     if(equali(Text, "rock"))          client_cmd(0, "spk sounds/randysmusicmod/rock.mp3")     if(equali(Text, "fuck"))          client_cmd(0, "spk sounds/randysmusicmod/fuck.wav")     if(equali(Text, "noob"))          client_cmd(0, "spk sounds/randysmusicmod/noob.wav")         if(equali(Text, "noob"))          client_cmd(0, "spk sounds/randysmusicmod/stfu.wav")     return PLUGIN_HANDLED }
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
randitobandito
Junior Member
Join Date: Mar 2006
Old 03-12-2006 , 12:22  
Reply With Quote #7

alright thanks man

edit: i just compiled and it worked perfectly, this is my first plugin so thanks for the help!
__________________

oh him? hes just a ninja, i keep him for when the pirates attack.
randitobandito is offline
Send a message via AIM to randitobandito
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 03-12-2006 , 12:28  
Reply With Quote #8

np.
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
randitobandito
Junior Member
Join Date: Mar 2006
Old 03-12-2006 , 12:34  
Reply With Quote #9

shit, when i try saying ANYTHING in the chat on my dedicated server 1. no chat messages come up, and 2. the sounds dont play.

any idea why?
__________________

oh him? hes just a ninja, i keep him for when the pirates attack.
randitobandito is offline
Send a message via AIM to randitobandito
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 03-12-2006 , 12:44  
Reply With Quote #10

If you need help with this, I suggest looking at this plugin:

http://forums.alliedmods.net/showthread.php?t=18779
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
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 20:26.


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