AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Abnormal Error (https://forums.alliedmods.net/showthread.php?t=2196)

RPRaiden 05-28-2004 20:34

Abnormal Error
 
1 Attachment(s)
Okay I edited some of my code and all and then when I compile I get an error (See Attachment)

Here is my plugin code so far.
Code:
/**************************************************************** *   Smoke the Blunt                     * *   Version 0.0.2 - Date: 26th May 2004         * *                               * *   By RPRaiden aka CopCartman <[email protected]>    * *   Homepage - <a href="http://www.daspace.de" target="_blank" rel="nofollow noopener">http://www.daspace.de</a>            * *                               * ***************************************************************** *                               * *           ADDITIONAL INFORMATION          * *                               * ***************************************************************** *                               * *   This Plugin introduces a smoking affect to the      * *   player who is under the affect of the command.      * *   Admin can set Who to stone and for howlong.     * *   This Plugin is designed for use with Inventory      * *   plugin by Mr.Smith, Edited by Twillight Suzuka.     * *                               * ***************************************************************** *                               * *   ORIGINAL BLUNT By ThorW with help from Duff & EJ    * *   Adapted By RPRaiden with help from Twillight Suzuka * *                               * ****************************************************************/ #include <amxmodx> #include <amxmisc> #include <fun> new smoke new usertime public admin_blunt(id,level,cid){     if (!(get_user_flags(id)&level)){     console_print(id,"[AMXX] You don't access to that command.")     return PLUGIN_HANDLED    }             new arg[32]             read_argv(1,arg,32)             read_argv(2,arg[1],32)         new player = find_player("lb",arg)     if (!player) return PLUGIN_HANDLED         new name[32], aname[32]         get_user_name(player,name, 31)         get_user_name(id,aname, 31)         new aPlayer[1]      aPlayer[0]= player      has_blunt(id,player)      set_task(0.6,"has_blunt",0,aPlayer[0],2,"a")         client_print(player,print_chat,"* %s Has passed you a blunt, now you can relax",aname)         return PLUGIN_HANDLED }     public has_blunt(id,player) {     if(is_user_alive(player)){         new vec[3]     if(usertime !=20){         usertime+=1     }         get_user_origin(player,vec)         new a1,b1         a1 = random_num(-30,30)         b1 = random_num(-30,30)         message_begin( MSG_BROADCAST,SVC_TEMPENTITY )         write_byte( 5 )         write_coord(vec[0]+a1)         write_coord(vec[1]+b1)         write_coord(vec[2]+30)         write_short( smoke )         write_byte( 30 )           write_byte( 10 )           message_end()     if(usertime =20){     set_task(0.6,"blunt_smoked",0,aPlayer[0],2,a)     }else{     set_task(0.6,"has_blunt",0,aPlayer[0],2,a)     } }         public plugin_precache(){     smoke = precache_model("sprites/steam1.spr")         return PLUGIN_CONTINUE }     public blunt_smoked(id,player) {     client_print(player,print_chat,"* Man! Your Blunt has Burn Out! You need to get some more weed %s!,aPlayer)     return PLUGIN_CONTINUE } public plugin_init(){         register_plugin("Admin_Blunt2","0.0.2","RPRaiden")         register_concmd("amx_blunt2","admin_blunt",ADMIN_LEVEL_A,"< nick >")    return PLUGIN_CONTINUE }

Ingram 05-28-2004 20:39

try redownloading amx and replacing your complier, it worked fine for me

Edit: oh, nevermind the file comes out with a size of 0kb

RPRaiden 05-28-2004 20:49

I noticed :S This is a real tongue twister

Apparently I got too many errors. All i added was the usertime variable and if , else statement. The Repeating of has_blunt and the public smoked_out.

:S

RPRaiden 05-28-2004 22:05

Ignore this im just going to have to redo the whole plugin from scratch. Not that its all my work because I merely edited the "Pass the Blunt" into a "Smoke the Blunt". But still now I have to remake it.

SidLuke 05-29-2004 02:28

Check all "(" and ")" IMO you are missing one :wink:

SidLuke 05-29-2004 02:30

Found it !
Code:
public blunt_smoked(id,player) {     client_print(player,print_chat,"* Man! Your Blunt has Burn Out! You need to get some more weed %s!,aPlayer)     return PLUGIN_CONTINUE }
Should be
Code:
public blunt_smoked(id,player) {     client_print(player,print_chat,"* Man! Your Blunt has Burn Out! You need to get some more weed %s!",aPlayer)     return PLUGIN_CONTINUE }
Sorry it was " not ( :lol:
It's easy to find such bugs with this small php code. There were to many red color :D

QwertyAccess 05-29-2004 02:37

Hehe thats a pretty useful php code SidLuke

AssKicR 05-29-2004 03:07

u should make a

say /pass Playername

so you can pass the blunt :P

AssKicR 05-29-2004 03:07

Light That Shit
Smoke That Shit
Pass That Shit :D

RPRaiden 05-29-2004 13:18

Btw I need to thank AssKickr for enlightening me on how to use usertime affectively. Ty. Thanks Luke for solving my problem, Also, This is an edited version of Pass the Blunt, it is now Smoke the blunt. amx_blunt2 name and it will then display the message and they will have steam above there head , when it burns out it displays that bottom message. Now im gonna try to add some stoned FX into it


All times are GMT -4. The time now is 07:02.

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