error 033: array must be indexed
Hi I'm trying to add a "frozen" option to my !spawn command on my HL2DM server so that a prop spawns frozen, (like !spawn <propname> frozen), but when I try to compile my plugin it gives this error: ilp/ilp_sourceop.sp(122) : error 033: array must be indexed (variable "-unknown-") . Here's the code:
Code:
public Action:Command_spawn(Client,args) |
Re: error 033: array must be indexed
StringToInt() returns an integer and you are comparing that to a string. It says that "frozen" shoule be index because it is an array and you can't compare an array to an integer.
BTW, you should post in the SourceMod section. This section is for AMX Mod X. |
Re: error 033: array must be indexed
Oops sorry. I thought this was the sourcemod section. How dumb am I? So would I use StringToString or strcompare or what?
|
Re: error 033: array must be indexed
Quote:
EDIT: strcmp() |
Re: error 033: array must be indexed
OK thanks. This worked:
Code:
public Action:Command_spawn(Client,args) |
| All times are GMT -4. The time now is 14:42. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.