Raised This Month: $ Target: $400
 0% 

help me with amx->amxx compile


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
meowlike
Junior Member
Join Date: Sep 2004
Location: Taiwan
Old 02-11-2005 , 22:27   help me with amx->amxx compile
Reply With Quote #1

Code:
/* * Enter and Leave Message *  v 0.2geo * *  by [MUPPETS] Gonzo *   <a href="mailto:[email protected]">[email protected]</a> * * some code was taken from * welcome_hudmsg by JustinHoMi * */   /* * Cvars: * amx_enter_message "%name% just entered %hostname%." * amx_leave_message "%name% just left %hostname%." * * If you are using csstats module then you may use * %rankpos% expression in amx_enter_message cvar. * */   #include <amxmod> #include <csstats> #include <geoip> public client_putinserver(id){    new param[34], len    param[0] = id    len = get_user_name(id,param[1],31)    set_task(2.0, "enter_msg", 0, param,len + 2)    return PLUGIN_CONTINUE }   public client_disconnect(id){    new param[34], len      param[0] = id    len = get_user_name(id, param[1], 31)    set_task(2.0, "leave_msg", 0, param, len + 2)      return PLUGIN_CONTINUE   }   public enter_msg(param[]) {      new message[192],hostname[64]    get_cvar_string("amx_enter_message", message, 191)    get_cvar_string("hostname", hostname, 63)      replace(message,191, "%hostname%", hostname)      if (cvar_exists("csstats_reset")){       new data[8], rankpos[8], pos       pos = get_user_stats(param[0],data,data)       numtostr(pos,rankpos,7)       replace(message, 191, "%rankpos%", rankpos)      }    if (cvar_exists("geoip_country")){       new ip[32], country[45]       get_user_ip(param[0],ip,31)       geoip_country(ip,country)       replace(message, 191, "%country%", country)      }    replace(message, 191, "%name%", param[1])    while(replace(message, 191, "\n", "^n")){}    set_hudmessage(0, 225, 0, 0.05, 0.55, 0, 6.0, 6.0, 0.5, 0.15, 3)      show_hudmessage(0, message)    return PLUGIN_CONTINUE }   public leave_msg(param[]) {    new message[192],hostname[64]    get_cvar_string("amx_leave_message", message, 191)      get_cvar_string("hostname", hostname, 63)      replace(message, 191, "%hostname%", hostname)      replace(message, 191, "%name%", param[1])      while(replace(message, 191, "\n", "^n")){}    set_hudmessage(0, 225, 0, 0.05, 0.55, 0, 6.0, 6.0, 0.5, 0.15, 3)      show_hudmessage(0, message)    return PLUGIN_CONTINUE   } public plugin_init() {     register_plugin("Enter-Leave Message","0.2","[MUPPETS] Gonzo")     return PLUGIN_CONTINUE   }

compile is ok, no problem, but when i put it in game, it's shows:

L 02/12/2005 - 11:23:52: [AMXX] Run time error 25 (parameter error) on line 63 (file "enter-leave_message.sma").
L 02/12/2005 - 11:23:52: String formatted incorrectly - parameter 3 (total 2)

plz help the newbie
meowlike is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 02-11-2005 , 22:51  
Reply With Quote #2

Why don't you point out what line 63 is in your copy of the code. Also, the below seems useless:

Code:
while(replace(message, 191, "\n", "^n")){} // why not just do this? replace(message, 191, "\n", "^n")
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Peli
Veteran Member
Join Date: Mar 2004
Location: San Diego, CA
Old 02-11-2005 , 23:29  
Reply With Quote #3

Wait , are you porting it to AMX Mod X? Then change the amx include.
Peli is offline
Send a message via MSN to Peli
meowlike
Junior Member
Join Date: Sep 2004
Location: Taiwan
Old 02-12-2005 , 08:05  
Reply With Quote #4

Quote:
Originally Posted by XxAvalanchexX
Why don't you point out what line 63 is in your copy of the code. Also, the below seems useless:

Code:
while(replace(message, 191, "\n", "^n")){} // why not just do this? replace(message, 191, "\n", "^n")
i'm sorry, next time i'll keep eyes on that (newbie saysXD)

Quote:
Wait , are you porting it to AMX Mod X? Then change the amx include.
i changed the include to amxmodx, still ot this problem.
i go trying XxAvalanchexX's way, thanks guys
meowlike is offline
nightscreem
Veteran Member
Join Date: Jul 2004
Location: Belgium
Old 02-12-2005 , 08:11  
Reply With Quote #5

and i think <csstats> should be <csx>
don't really know but try it
__________________
- Bye bye!
nightscreem is offline
meowlike
Junior Member
Join Date: Sep 2004
Location: Taiwan
Old 02-12-2005 , 15:00  
Reply With Quote #6

Quote:
Originally Posted by XxAvalanchexX
Why don't you point out what line 63 is in your copy of the code. Also, the below seems useless:

Code:
while(replace(message, 191, "\n", "^n")){} // why not just do this? replace(message, 191, "\n", "^n")
i follow your advance, but its still not working.
Quote:
L 02/13/2005 - 03:51:21: [AMXX] Run time error 25 (parameter error) on line 63 (file "enter-leave_message.sma").
L 02/13/2005 - 03:51:21: String formatted incorrectly - parameter 3 (total 2)
at least, the leave massage can shows currectly, only the join message can't. i doubt geoip is the prime criminal...

nightscreem i'll try it, later report
meowlike is offline
meowlike
Junior Member
Join Date: Sep 2004
Location: Taiwan
Old 02-12-2005 , 15:12  
Reply With Quote #7

it's no use.still got same error
Quote:
L 02/13/2005 - 04:08:03: [AMXX] Run time error 25 (parameter error) on line 63 (file "enter-leave_message.sma"
).
L 02/13/2005 - 04:08:03: String formatted incorrectly - parameter 3 (total 2)
lol i m crazy Orz...
meowlike is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 02-12-2005 , 15:54  
Reply With Quote #8

Once again, what is line 63 in your copy of the code?
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
meowlike
Junior Member
Join Date: Sep 2004
Location: Taiwan
Old 02-12-2005 , 22:20  
Reply With Quote #9

Quote:
Originally Posted by XxAvalanchexX
Once again, what is line 63 in your copy of the code?
oh... really sorry i forgot. if i make the same mistake next time, i'll never ask question over her lol

THIS is the line 63... sorry again..

Code:
   show_hudmessage(0, message)
meowlike is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 02-12-2005 , 22:41  
Reply With Quote #10

Try printing out the string with a console_print to see if it appears as it should or if something is wrong.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
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 19:22.


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