Error out of left field

Fluxxdog

Active member
Code:
int slimeML(int x){ return 100+max_mcd()+10-leeway+min(15*x*(x+2),1000);}
Given the above code, why do I keep getting this error for it?
Code:
Expected ;, found ( (wardrobe.ash, line 221)
It just happened out of nowhere. The function worked perfectly fine before I worked on some lines of code below it, I can block out the entire section of code that uses it and the script will verify perfectly fine. I've tried restarting mafia, shutting down all my java.exe processes, rebooting my computer, and this line is somehow broken! Debug log shows nothing but the error message. It's like it hits that opening parenthesis and suddenly shoves its head up its ass and beats itself with a rubber chicken.
 
Code:
> ashq int leeway = 1; int slimeML( int x ) { return 100 + current_mcd( ) + 10 - leeway + min( 15*x*(x+2),1000 ); } slimeML( 3 ).print();

334
I'm not having any problem with that line. Maybe your script is missing a ; or a closing bracket earlier?
 
I checked plenty of times for errors previously by commenting out previous code, everything parses fine. I tried your CLI example and that worked fine, but the script itself doesn't as if it decided it doesn't like that one function declaration. I can't imagine what I'm missing (or should have missing).
Maybe something in the script itself? I don't know. The scripts I import in to it work perfectly fine on their own. slimeML isn't existent in any other script, only this one.
 

Attachments

Back
Top