Raised This Month: $ Target: $400
 0% 

My Script Won't Compile


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Poison_Jay
Senior Member
Join Date: May 2004
Old 06-24-2004 , 10:01   My Script Won't Compile
Reply With Quote #1

shieldwar.sma
Code:
/* AMXX Mod script. * * Shield War * Version Beta 1 * By: Poison_Jay * Special Thanks: Peli, Kingpin * * MSN: <a href="mailto:[email protected]">[email protected]</a> * * Commands: amx_shieldwar 1|0 * * Discription: All Players Spawn With Shield + Deagle */ #define TIME 5.0 #include <amxmodx> #include <fun> public plugin_init() {     register_plugin("Shield War","1","Poison_Jay");     register_event("CurWeapon","shield","be","1=1")     register_cvar("amx_shieldwar","1")     register_concmd("amx_shieldwar","amx_shieldwar",ADMIN_LEVEL_B","1 = On 2 = Off") } public shield(id) {     if(get_cvar_num("amx_shieldwar")==0)            return PLUGIN_CONTINUE                   if(get_cvar_num("amx_shieldwar")==1) {         set_hudmessage(255, 0, 0, -1.0, -1.0, 0, 6.0, TIME, 0.5, 1.5, 4 )         show_hudmessage(0, "ShieldWar mode has been enabled")         new clip, ammo         new usersweapon = get_user_weapon(id,clip,ammo)         client_cmd(id, "drop")         if(usersweapon==CSW_SHIELD) {             //nothing         }         if(usersweapon==CSW_DEAGLE) {         give_item(id,"ammo_50ae")         } else {         set_hudmessage(255, 0, 0, -1.0, -1.0, 0, 6.0, TIME, 0.5, 1.5, 4 )         show_hudmessage(0, "ShieldWar mode has been enabled"         give_item(id,"weapon_shield")         give_item(id,"weapon_deagle")         give_item(id,"ammo_50ae")         give_item(id,"ammo_50ae")         give_item(id,"ammo_50ae")         give_item(id,"ammo_50ae")         give_item(id,"ammo_50ae")          set_hudmessage(255, 0, 0, -1.0, -1.0, 0, 6.0, TIME, 0.5, 1.5, 4 )          show_hudmessage(0, "ShieldWar mode has been enabled")     }     return PLUGIN_HANDLED }

shieldwar.amx using web compiler



there was nothing in it! i was like wtf?![/small]
Poison_Jay is offline
Send a message via MSN to Poison_Jay
Girthesniper
Senior Member
Join Date: Mar 2004
Location: Maryland
Old 06-24-2004 , 11:15  
Reply With Quote #2

Here is the following errors I get when it is atempted compile.

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

C:\Documents and Settings\Robert Blody\Desktop\shieldwarz.sma(24) : error 001: expected token: ",", but found "-string-"
C:\Documents and Settings\Robert Blody\Desktop\shieldwarz.sma(24 -- 27) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Robert Blody\Desktop\shieldwarz.sma(24 -- 27) : error 001: expected token: ",", but found "public"
C:\Documents and Settings\Robert Blody\Desktop\shieldwarz.sma(24 -- 28) : error 029: invalid expression, assumed zero
Might wana get on that. ;)
__________________
BANNED
Girthesniper is offline
Send a message via AIM to Girthesniper Send a message via MSN to Girthesniper
AssKicR
Veteran Member
Join Date: Mar 2004
Location: Norway-Europe(GTM+1)
Old 06-24-2004 , 11:18  
Reply With Quote #3

here is one without the bugs, but it still won't work the way i think i want it to

Code:
/* AMXX Mod script. * * Shield War * Version Beta 1 * By: Poison_Jay * Special Thanks: Peli, Kingpin * * MSN: <a href="mailto:[email protected]">[email protected]</a> * * Commands: amx_shieldwar 1|0 * * Discription: All Players Spawn With Shield + Deagle */ #define TIME 5.0 #include <amxmodx> #include <fun> public plugin_init() {     register_plugin("Shield War","1","Poison_Jay");     register_event("CurWeapon","shield","be","1=1")     register_cvar("amx_shieldwar","1")     register_concmd("amx_shieldwar","amx_shieldwar",ADMIN_LEVEL_B,"1 = On 2 = Off") } public shield(id) {     if(get_cvar_num("amx_shieldwar")==0)            return PLUGIN_CONTINUE                     if(get_cvar_num("amx_shieldwar")==1) {         set_hudmessage(255, 0, 0, -1.0, -1.0, 0, 6.0, TIME, 0.5, 1.5, 4 )         show_hudmessage(0, "ShieldWar mode has been enabled")         new clip, ammo         new usersweapon = get_user_weapon(id,clip,ammo)         client_cmd(id, "drop")         if(usersweapon==CSW_DEAGLE) {             give_item(id,"ammo_50ae")         } else {             set_hudmessage(255, 0, 0, -1.0, -1.0, 0, 6.0, TIME, 0.5, 1.5, 4 )             show_hudmessage(0,"ShieldWar mode has been enabled")             give_item(id,"weapon_shield")             give_item(id,"weapon_deagle")             give_item(id,"ammo_50ae")             give_item(id,"ammo_50ae")             give_item(id,"ammo_50ae")             give_item(id,"ammo_50ae")             give_item(id,"ammo_50ae")             set_hudmessage(255, 0, 0, -1.0, -1.0, 0, 6.0, TIME, 0.5, 1.5, 4 )             show_hudmessage(0, "ShieldWar mode has been enabled")         }     }     return PLUGIN_HANDLED
__________________
My Plugins

Got ??
AssKicR is offline
Poison_Jay
Senior Member
Join Date: May 2004
Old 06-24-2004 , 11:25  
Reply With Quote #4

how did u want it?

i wanted...
-SHield+deagle with ammo ^^
-restrict all other weapons

considering...
-unlimited ammos
Poison_Jay is offline
Send a message via MSN to Poison_Jay
AssKicR
Veteran Member
Join Date: Mar 2004
Location: Norway-Europe(GTM+1)
Old 06-24-2004 , 16:03  
Reply With Quote #5

well then u need more code
__________________
My Plugins

Got ??
AssKicR is offline
Peli
Veteran Member
Join Date: Mar 2004
Location: San Diego, CA
Old 06-24-2004 , 19:32  
Reply With Quote #6

Quote:
Originally Posted by Poison_Jay
how did u want it?

i wanted...
-SHield+deagle with ammo ^^
-restrict all other weapons

considering...
-unlimited ammos
Okay , your code has : Shield+Deagle+Ammo , but it does NOT have Restriction to all other weapons or Unlimited ammo.
Peli is offline
Send a message via MSN to Peli
Girthesniper
Senior Member
Join Date: Mar 2004
Location: Maryland
Old 06-24-2004 , 19:34  
Reply With Quote #7

He probley wants the base plugin working. Then he will add the rest later.
__________________
BANNED
Girthesniper is offline
Send a message via AIM to Girthesniper Send a message via MSN to Girthesniper
Peli
Veteran Member
Join Date: Mar 2004
Location: San Diego, CA
Old 06-24-2004 , 19:35  
Reply With Quote #8

Yea that would be a smart idea , I sugguest saving what you have now incase you mess with some stuff and forget what you messed up so you have to start all over. That happened to me. Lol.
Peli is offline
Send a message via MSN to Peli
Poison_Jay
Senior Member
Join Date: May 2004
Old 06-24-2004 , 22:50  
Reply With Quote #9

ya i saved it already, i'm trying to look at other plugins how they do it...

So...does mine give the whole team?
does it happen every new round?

i can't test it cuz i keep getting error when i join my own game when i select the skin i want -.-''
Poison_Jay is offline
Send a message via MSN to Poison_Jay
Poison_Jay
Senior Member
Join Date: May 2004
Old 06-24-2004 , 23:20  
Reply With Quote #10

Quote:
Loaded 2 admins from file
L 06/25/2004 - 10:08:56: [AMXX] Function is not present (function "amx_shieldwar") (plugin "shieldwar.amx")
L 06/25/2004 - 10:08:56: [AMXX] Run time error 10 on line 24 (plugin "shieldwar.amx")
omfg
Poison_Jay is offline
Send a message via MSN to Poison_Jay
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 14:52.


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