AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Somethings wrong.. (https://forums.alliedmods.net/showthread.php?t=50152)

Amxx-PluginCreator 01-20-2007 17:33

Somethings wrong..
 
I can't compile my test plugin? You know why? +Karma if helped.

Code:

#include <amxmodx>
#include <tfcx>
#include <fun>

public plugin_init()
{
    register_plugin("WeaponMe","0.1","NeoFORT")
    register_clcmd("say needrocket","fnSayNeedRocket")
}

public fnSayNeedRocket(id)
{
    give_item(id,"tf_weapon_rpg")
    tfc_setbammo(id,TFC_AMMO_ROCKETS,25)
    client_cmd(id,"tf_weapon_rpg")
  }
 
  public plugin_init()
{
    register_clcmd("say needcrowbar","fnSayNeedCrowbar")
}

public fnSayNeedCrowbar(id)
{
    give_item(id,"tf_weapon_crowbar")
    client_cmd(id,"tf_weapon_crowbar")
 
 }
 
 public plugin_init()
{
    register_clcmd("say needshotgun","fnSayNeedShotGun")
}

public fnSayNeedShotGun(id)
{
    give_item(id,"tf_weapon_shotgun")
    client_cmd(id,"tf_weapon_shotgun")
   
  }

I didn't originaly make this plugins, I'm editing it and adding more to it. Sounds will be added later when we know what problem is.

[ --<-@ ] Black Rose 01-20-2007 17:39

Re: Somethings wrong..
 
Hint: Check compiler...
Code:

Error: Symbol already defined: "plugin_init" on line 19
Error: Symbol already defined: "plugin_init" on line 31

Code:
#include <amxmodx> #include <tfcx> #include <fun> public plugin_init() {     register_plugin("WeaponMe","0.1","NeoFORT")     register_clcmd("say needrocket","fnSayNeedRocket")     register_clcmd("say needcrowbar","fnSayNeedCrowbar")     register_clcmd("say needshotgun","fnSayNeedShotGun") } public fnSayNeedRocket(id) {     give_item(id, "tf_weapon_rpg")     tfc_setbammo(id, TFC_AMMO_ROCKETS,25)     client_cmd(id, "tf_weapon_rpg") } public fnSayNeedCrowbar(id) {     give_item(id,"tf_weapon_crowbar")     client_cmd(id,"tf_weapon_crowbar") } public fnSayNeedShotGun(id) {     give_item(id, "tf_weapon_shotgun")     client_cmd(id, "tf_weapon_shotgun") }

Amxx-PluginCreator 01-20-2007 17:39

Re: Somethings wrong..
 
I'm new, don't post nonsense please, and help.

Amxx-PluginCreator 01-20-2007 17:44

Re: Somethings wrong..
 
Ahh, thank you for your help. ++Karma

SweatyBanana 01-20-2007 17:51

Re: Somethings wrong..
 
Quote:

Originally Posted by Amxx-PluginCreator (Post 429623)
I'm new, don't post nonsense please, and help.

What nonsense?

ok so he edited and added the code, but the compiler problems do tell you exactly what is wrong..

plugin_init was used twice obviously and it was yelling at you for that.

[ --<-@ ] Black Rose 01-20-2007 18:05

Re: Somethings wrong..
 
Quote:

Originally Posted by SweatyBanana (Post 429633)
plugin_init was used twice obviously and it was yelling at you for that.

3 times actually.

SweatyBanana 01-20-2007 18:06

Re: Somethings wrong..
 
Quote:

Originally Posted by [ --<-@ ] Black Rose (Post 429638)
3 times actually.

ahh well close enough guess LOL

Amxx-PluginCreator 01-20-2007 18:10

Re: Somethings wrong..
 
Anyway, thanks. :mrgreen:


All times are GMT -4. The time now is 22:29.

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