Raised This Month: $ Target: $400
 0% 

multi " in one line


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
biscuit628
Senior Member
Join Date: Jun 2007
Location: 香港HongKong
Old 05-19-2009 , 02:45   multi " in one line
Reply With Quote #1

halo, i am script a plugin it's need at least three "
like this
-----delete-----

here is my new problem!
PHP Code:
server_cmd("hlg_action ^"u:found^" ^"hlg_say [HLGViolation by %n(%idetected^"")

server_cmd("hlg_action ^"u:found^" ^"hlg_say [HLGViolation: %y^"")

server_cmd("hlg_action ^"u:found^" ^"hlg_say [HLGPunishmentban^"")

server_cmd("hlg_action ^"u:found^" ^"amx_banip #%u 0^"") 
and i get this error
L 05/20/2009 - 08:168: String formatted incorrectly - parameter 2 (total 1)
L 05/20/2009 - 08:168: [AMXX] Displaying debug trace (plugin "anti_cheat.amxx")
L 05/20/2009 - 08:168: [AMXX] Run time error 25: parameter error

don't tell me just using the hlg_xxx.cfg..
sorry for my poor english..
__________________
My Plugins

C4man with fun

Sniper Skill bonus
-------------------------
Sorry for my poor English!

Last edited by biscuit628; 05-19-2009 at 20:51.
biscuit628 is offline
-=hunter=-
Senior Member
Join Date: Jul 2008
Old 05-19-2009 , 02:59   Re: many " in one line
Reply With Quote #2

use register_srvcmd
Code:
register_srvcmd ( const server_cmd[],const function[],flags=-1, info[]="" )
-=hunter=- is offline
Send a message via ICQ to -=hunter=- Send a message via Skype™ to -=hunter=-
Old 05-19-2009, 19:32
fysiks
This message has been deleted by fysiks. Reason: I'm confused . . .
biscuit628
Senior Member
Join Date: Jun 2007
Location: 香港HongKong
Old 05-20-2009 , 06:33   Re: many " in one line
Reply With Quote #4

Quote:
Originally Posted by -=hunter=- View Post
use register_srvcmd
Code:
register_srvcmd ( const server_cmd[],const function[],flags=-1, info[]="" )
i think that isn't work for me in this case
__________________
My Plugins

C4man with fun

Sniper Skill bonus
-------------------------
Sorry for my poor English!
biscuit628 is offline
minimiller
Veteran Member
Join Date: Aug 2007
Location: United Kingdom
Old 05-20-2009 , 08:15   Re: multi " in one line
Reply With Quote #5

what are you trying to do?
__________________
minimiller is offline
Send a message via MSN to minimiller
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-20-2009 , 10:11   Re: multi " in one line
Reply With Quote #6

It looks like you are trying to pass variables into the string but you do not specify the variables.

Try to stick to these:
Code:
%s - String 
%f - Floating point number 
%d - Integer
PHP Code:
// %n and %i
server_cmd("hlg_action ^"u:found^" ^"hlg_say [HLGViolation by %n(%idetected^"" variable1 variable2 )

// %y
server_cmd("hlg_action ^"u:found^" ^"hlg_say [HLGViolation: %y^"" variable1 )

server_cmd("hlg_action ^"u:found^" ^"hlg_say [HLGPunishmentban^"" )

// %u
server_cmd("hlg_action ^"u:found^" ^"amx_banip #%u 0^"" , variable1 ) 
__________________
Bugsy is offline
biscuit628
Senior Member
Join Date: Jun 2007
Location: 香港HongKong
Old 05-20-2009 , 11:21   Re: multi " in one line
Reply With Quote #7

Quote:
Originally Posted by Bugsy View Post
It looks like you are trying to pass variables into the string but you do not specify the variables.

Try to stick to these:
Code:
%s - String 
%f - Floating point number 
%d - Integer
.....

thank,and i also know that..i try already..it's not work
PHP Code:
public hlg_check()
{
    for( new 
id 0id <= g_MaxPlayersid++ ) 
    {
    new 
name[33],ip[17]
    
get_user_name(id,name,32)
    
get_user_ip(id,ip,16)
   
server_cmd("hlg_action ^"u:found^" ^"hlg_say [HLGViolation by %s(%sdetected^"",name,ip)
   
server_cmd("hlg_action ^"u:found^" ^"hlg_say [HLGViolationSomething^"")
   
server_cmd("hlg_action ^"u:found^" ^"hlg_say [HLGPunishmentban^"")
   
server_cmd("hlg_action ^"u:found^" ^"amx_banip #%d 0^"",get_user_userid(id))
   
}

but the hlg file also setting like that
Attached Files
File Type: cfg 複製 -hlg_lan.cfg (3.4 KB, 109 views)
__________________
My Plugins

C4man with fun

Sniper Skill bonus
-------------------------
Sorry for my poor English!

Last edited by biscuit628; 05-20-2009 at 11:28.
biscuit628 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 01:29.


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