Right now i'm trying to expound on the code functionality of t3knomanser
I've got the following in my layer...
class chsllamaStuff {
function testFunction(string fred) : string;
}
function chsllamaStuff::testFunction(string fred) : string {
if ($fred=="cheese") { """
<h1 align=center>CHEESE</h1>
"""; } elseif ($fred=="beef") { """
<h1 align=center>BEEF</h1>
"""; } else { """
<h1 align=center>BURRITO</h1>
"""; }
}
But when I go to compile it, it get the following error.
Compile error: line 38, column 1: Can't define undeclared object function chsllamaStuff::testFunction(string) S2::NodeFunction, S2/NodeFunction.pm, 165 S2::Checker, S2/Checker.pm, 339 S2::Compiler, S2/Compiler.pm, 34 38: function chsllamaStuff::testFunction(string fred) : string {
What should I do to get this to work? Do I declare string fred somewhere? the class? I'm lost.