error 033: array must be indexed(variable "g_fColor")
Hello
What I was trying to do Trying to add some random color to the door PHP Code:
|
Re: error 033: array must be indexed(variable "g_fColor")
post how you declare g_fColor
|
Re: error 033: array must be indexed(variable "g_fColor")
PHP Code:
|
Re: error 033: array must be indexed(variable "g_fColor")
I think it is because bar_Random only take 1 parameters, not 3
|
Re: error 033: array must be indexed(variable "g_fColor")
Try this
PHP Code:
|
Re: error 033: array must be indexed(variable "g_fColor")
Same error again
why when i add this HTML Code:
random_float(0.0, 255.0) |
Re: error 033: array must be indexed(variable "g_fColor")
since g_fColor has float values, bar_Random is made to return float values
PHP Code:
since the value of g_fColors is hardcorded, you could return the index of the colors by using random(sizeof(g_fColors)-1) |
Re: error 033: array must be indexed(variable "g_fColor")
The error is now fixed
But it still does not work, random values are not added |
Re: error 033: array must be indexed(variable "g_fColor")
If you're just trying to get a random index value for the colors array, you simply do that first:
PHP Code:
PHP Code:
PHP Code:
I think you're complicating things by trying to be clever with your code. Stop using the preprocessor and write basic code first, it doesn't have to be pretty or scalable, just write it to make it work. Get that working and then optimize later. Quote:
|
Re: error 033: array must be indexed(variable "g_fColor")
It has always been difficult for me to understand
I will try my best thank you |
| All times are GMT -4. The time now is 07:45. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.