Raised This Month: $51 Target: $400
 12% 

Having a problem with my plugin....


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
knekter
Senior Member
Join Date: Mar 2004
Location: PA
Old 03-16-2004 , 21:48   Having a problem with my plugin....
Reply With Quote #1

I got a a few problems when I compiled my code, but I can't figure out why its wrong. Heres my code:

Code:
/////////////////// #include <amxmodx> #include <amxmisc> #include <fun> #include <cstrike> /////////////////// public plugin_init() {     register_plugin("Predator Vs Prey","0.1","Ashade")     register_concmd("amx_predator","admin_predator",ADMIN_KICK,"<name> <1 | 0>" } /////////////////// public admin_predator(id,level,cid) {     if(!cmd_access(id,level,cid,3))     {         return PLUGIN_HANDLED     }     server_cmd("mp_limitteams 0")     server_cmd("mp_autoteambalance 0")     server_cmd("sv_restart 1")     new users[32], numberofplayers, i, cur_id     get_players(users,numberofplayers)     for (i=0;i<numberofplayers;i++)     {         cur_id = users[i]         cs_set_user_team(cur_id,1)     }     new name[32]     new on[12]     read_argv(1,name,32)     read_argv(2,on,12)     on = str_to_num(on)     if((on)==1)     {         new player = cmd_target(id,name,3)         cs_set_user_team(player,2)         set_user_health(player,200)         set_user_armor(player,200)         set_user_rendering(player,kRenderFxNone,0,0,0,kRenderTransAlpha,50)         set_user_gravity(player,0.5)         set_user_footsteps(player,0)         client_print(0,print_center,"A Predator Has Been Chosen, BEWARE!")         return PLUGIN_CONTINUE     }     return PLUGIN_HANDLED }

Whats wrong?
__________________
More updates for Matrix Mod!
knekter is offline
Send a message via AIM to knekter Send a message via MSN to knekter
tnsk8er27
Senior Member
Join Date: Mar 2004
Location: richfield MN
Old 03-16-2004 , 21:49  
Reply With Quote #2

what kind of errors come up?
__________________
Toxic
tnsk8er27 is offline
Send a message via AIM to tnsk8er27
knekter
Senior Member
Join Date: Mar 2004
Location: PA
Old 03-16-2004 , 21:51   Errors
Reply With Quote #3

Small compiler 2.1.0 Copyright (c) 1997-2002, ITB CompuPhase

kz_allinone_amxx.sma(94) : warning 217: loose indentation

1 Warning.
Small compiler 2.1.0 Copyright (c) 1997-2002, ITB CompuPhase

predator.sma(10 -- 11) : error 001: expected token: ",", but found "}"
predator.sma(10 -- 13) : warning 202: number of arguments does not match definit
ion
predator.sma(10 -- 13) : error 001: expected token: ",", but found "public"
predator.sma(10 -- 15) : error 029: invalid expression, assumed zero
Press any key to continue . . .
__________________
More updates for Matrix Mod!
knekter is offline
Send a message via AIM to knekter Send a message via MSN to knekter
tnsk8er27
Senior Member
Join Date: Mar 2004
Location: richfield MN
Old 03-16-2004 , 21:53  
Reply With Quote #4

k thx ill have a look
__________________
Toxic
tnsk8er27 is offline
Send a message via AIM to tnsk8er27
tnsk8er27
Senior Member
Join Date: Mar 2004
Location: richfield MN
Old 03-16-2004 , 22:00  
Reply With Quote #5

Code:
/////////////////// #include <amxmodx> #include <amxmisc> #include <fun> #include <cstrike> /////////////////// public plugin_init() {     register_plugin("Insane Pistol Arena","0.1","Ashade")     register_concmd("amx_predator","admin_predator",ADMIN_KICK,"<name> <1 | 0>") } /////////////////// public admin_predator(id,level,cid) {     if(!cmd_access(id,level,cid,3))     {         return PLUGIN_HANDLED     }     server_cmd("mp_limitteams 0")     server_cmd("mp_autoteambalance 0")     server_cmd("sv_restart 1")     new users[32], numberofplayers, i, cur_id     get_players(users,numberofplayers)     for (i=0;i<numberofplayers;i++)     {         cur_id = users[i]         cs_set_user_team(cur_id,1)     }     new name[32]     new on[12]     read_argv(1,name,32)     read_argv(2,on,12)     on = str_to_num(on)     if((on)==1)     {         new player = cmd_target(id,name,3)         cs_set_user_team(player,2)         set_user_health(player,200)         set_user_armor(player,200)         set_user_rendering(player,kRenderFxNone,0,0,0,kRenderTransAlpha,50)         set_user_gravity(player,0.5)         set_user_footsteps(player,0)         client_print(0,print_center,"A Predator Has Been Chosen, BEWARE!")         return PLUGIN_CONTINUE     }     return PLUGIN_HANDLED }


k try compiling this
__________________
Toxic
tnsk8er27 is offline
Send a message via AIM to tnsk8er27
tnsk8er27
Senior Member
Join Date: Mar 2004
Location: richfield MN
Old 03-16-2004 , 22:03  
Reply With Quote #6

k wait that gave more errors
hold on




k now im down to one last error
__________________
Toxic
tnsk8er27 is offline
Send a message via AIM to tnsk8er27
knekter
Senior Member
Join Date: Mar 2004
Location: PA
Old 03-17-2004 , 14:47   Only error I get
Reply With Quote #7

Small compiler 2.1.0 Copyright (c) 1997-2002, ITB CompuPhase

kz_allinone_amxx.sma(94) : warning 217: loose indentation

1 Warning.
Small compiler 2.1.0 Copyright (c) 1997-2002, ITB CompuPhase

predator.sma(32 -- 33) : error 033: array must be indexed (variable "predon")
predator.sma(33) : error 033: array must be indexed (variable "predon")

2 Errors.
Press any key to continue . . .

this is what I get now, PLZ HELP!
__________________
More updates for Matrix Mod!
knekter is offline
Send a message via AIM to knekter Send a message via MSN to knekter
knekter
Senior Member
Join Date: Mar 2004
Location: PA
Old 03-17-2004 , 14:49   nvm fixed!
Reply With Quote #8

I fixed it, HURRAY!
__________________
More updates for Matrix Mod!
knekter is offline
Send a message via AIM to knekter Send a message via MSN to knekter
BigBaller
Veteran Member
Join Date: Mar 2004
Location: Everett, WA
Old 03-17-2004 , 14:56  
Reply With Quote #9

good job I guess, looks like a fun plugin.
__________________

BigBaller is offline
pr0*killa
Member
Join Date: Mar 2004
Location: Estonia,Tallinn
Old 03-17-2004 , 15:01  
Reply With Quote #10

looks like a fun plugin for me too
__________________
"bug" is a verry big problem
pr0*killa is offline
Send a message via ICQ to pr0*killa
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 15:53.


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