Author Topic: [Solved] Stupid Syntax Error  (Read 791 times)

Code: [Select]
function fxDTSBrick::switch(%obj, %option, %client)
That line of code has a syntax error and I'm probably just too stupid to see it.

I know for a fact that it's that line, because if I replace it with function test() there is no error. I've tried rewriting the line, but to no avail.
« Last Edit: July 22, 2013, 06:39:07 PM by jes00 »

I don't see an error. Could you post the full function?

Post the code that is above it

Post the code block from above it.

If that's all you have (which I very much doubt, you secretive bastard) then you just need to do this:
Code: [Select]
function fxDTSBrick::switch(%obj, %option, %client)
{

}

post more derp
there is also a possibility that naming a function "switch" may cause problems since that is a default function
However, since this is an object based method, I doubt that very much.
« Last Edit: July 22, 2013, 05:07:53 PM by Nexus »

You can't use that name for the function.

You can't use that name for the function.
What are the forbidden words?


function if(){}

function switch(){}

function or(){} apparently also according to ipq

function scriptobject(){}

stuff like that

function if(){}

function switch(){}

function or(){} apparently also according to ipq

function scriptobject(){}

stuff like that
Thanks Nexus.

function scriptobject(){}
"scriptobject" is not a part of the language like "new" and "switch" are. It's simply a name and is OK to use without messing anything up.

Note: this is why you don't lock topics even if they're "solved"