Raised This Month: $ Target: $400
 0% 

Abnormal Error


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
RPRaiden
Member
Join Date: Apr 2004
Location: UK
Old 05-28-2004 , 20:34   Abnormal Error
Reply With Quote #1

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 }
Attached Thumbnails
Click image for larger version

Name:	compiler.jpg
Views:	133
Size:	18.3 KB
ID:	557  
__________________
RPRaiden is offline
Send a message via ICQ to RPRaiden Send a message via AIM to RPRaiden Send a message via MSN to RPRaiden Send a message via Yahoo to RPRaiden
Ingram
Veteran Member
Join Date: May 2004
Old 05-28-2004 , 20:39  
Reply With Quote #2

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

Edit: oh, nevermind the file comes out with a size of 0kb
Ingram is offline
RPRaiden
Member
Join Date: Apr 2004
Location: UK
Old 05-28-2004 , 20:49  
Reply With Quote #3

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 is offline
Send a message via ICQ to RPRaiden Send a message via AIM to RPRaiden Send a message via MSN to RPRaiden Send a message via Yahoo to RPRaiden
RPRaiden
Member
Join Date: Apr 2004
Location: UK
Old 05-28-2004 , 22:05  
Reply With Quote #4

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.
__________________
RPRaiden is offline
Send a message via ICQ to RPRaiden Send a message via AIM to RPRaiden Send a message via MSN to RPRaiden Send a message via Yahoo to RPRaiden
SidLuke
Senior Member
Join Date: Mar 2004
Location: Poland, Chrzanow
Old 05-29-2004 , 02:28  
Reply With Quote #5

Check all "(" and ")" IMO you are missing one
SidLuke is offline
Send a message via AIM to SidLuke Send a message via MSN to SidLuke
SidLuke
Senior Member
Join Date: Mar 2004
Location: Poland, Chrzanow
Old 05-29-2004 , 02:30  
Reply With Quote #6

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 (
It's easy to find such bugs with this small php code. There were to many red color
SidLuke is offline
Send a message via AIM to SidLuke Send a message via MSN to SidLuke
QwertyAccess
Veteran Member
Join Date: Feb 2004
Location: Enjiru Layer
Old 05-29-2004 , 02:37  
Reply With Quote #7

Hehe thats a pretty useful php code SidLuke
__________________
QwertyAccess is offline
AssKicR
Veteran Member
Join Date: Mar 2004
Location: Norway-Europe(GTM+1)
Old 05-29-2004 , 03:07  
Reply With Quote #8

u should make a

say /pass Playername

so you can pass the blunt
__________________
My Plugins

Got ??
AssKicR is offline
AssKicR
Veteran Member
Join Date: Mar 2004
Location: Norway-Europe(GTM+1)
Old 05-29-2004 , 03:07  
Reply With Quote #9

Light That Shit
Smoke That Shit
Pass That Shit
__________________
My Plugins

Got ??
AssKicR is offline
RPRaiden
Member
Join Date: Apr 2004
Location: UK
Old 05-29-2004 , 13:18  
Reply With Quote #10

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
__________________
RPRaiden is offline
Send a message via ICQ to RPRaiden Send a message via AIM to RPRaiden Send a message via MSN to RPRaiden Send a message via Yahoo to RPRaiden
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 07:02.


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