|
Posted by RenTechie on 05/06/06 16:59
Rik wrote:
> RenTechie wrote:
>> I get this error:
>> Parse error: parse error, unexpected $ in [file] on line 63
>> Where [file] is the path and filename for a file containing:
>> <snip code>
> Check your nesting, opening and closing {}, I don't think they're right.
> Maybe it's disappeared in posting, but you function powercentres() doesn't
> seems to close here.
> Also, think about switch statements instead of elseif's.
> Reads as: $pcs[1]['type'] is 'conventional' is $roll < 14, if $roll is > 14
> AND a new rand(1,20)==1, $pcs[1]['type'] doesn't get set at all!
> Also: all the code in your powercentres() function doesn't get executed, as
> the first thing you do is returning a statical array.
> Proper tools for coding (syntax highlighting) and indenting code could have
> told you a lot.
> It's not pretty, no it sure ain't.
It was a couple of unclosed blocks right where you pointed. I wanted to
test the bigger function, and was returning static results to make sure
that the structure came through. The bad indentations were because I
went back and was adding stuff and decided to test.
Thanks for the help,
RT
Navigation:
[Reply to this message]
|