Raised This Month: $12 Target: $400
 3% 

Error #033 Array must be indexed (variable name)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ryo89589
Member
Join Date: Aug 2011
Old 02-05-2014 , 06:55   Error #033 Array must be indexed (variable name)
Reply With Quote #1

PHP Code:
#include <amxmodx>

public CheckTime(id)
{
 new 
test 0
 client_cmd
(id"Test: %s"test"OK":0)
 return 
PLUGIN_HANDLED

Thank you!
ryo89589 is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 02-05-2014 , 07:05   Re: Error #033 Array must be indexed (variable name)
Reply With Quote #2

client_cmd(id, "Test: %s", test ? "OK" : "")

Last edited by jimaway; 02-05-2014 at 07:05.
jimaway is offline
ryo89589
Member
Join Date: Aug 2011
Old 02-05-2014 , 07:10   Re: Error #033 Array must be indexed (variable name)
Reply With Quote #3

Quote:
Originally Posted by jimaway View Post
client_cmd(id, "Test: %s", test ? "OK" : "")
Thank you.
if
PHP Code:
client_cmd(id"Test: %s"testtest:""
?

Last edited by ryo89589; 02-05-2014 at 07:12.
ryo89589 is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 02-05-2014 , 07:12   Re: Error #033 Array must be indexed (variable name)
Reply With Quote #4

client_cmd(id, "Test: %d", test)

no point in doing "if test is not 0, print test, otherwise print 0"

Last edited by jimaway; 02-05-2014 at 07:12.
jimaway is offline
ryo89589
Member
Join Date: Aug 2011
Old 02-05-2014 , 07:13   Re: Error #033 Array must be indexed (variable name)
Reply With Quote #5

Quote:
Originally Posted by jimaway View Post
client_cmd(id, "Test: %d", test)
Thank you!!
ryo89589 is offline
Reply


Thread Tools
Display Modes

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 15:38.


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