Raised This Month: $ Target: $400
 0% 

Solved Error 010 Invalid function or declaration


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
malec321
Senior Member
Join Date: May 2009
Location: Los Angeles
Old 01-30-2018 , 16:52   Error 010 Invalid function or declaration
Reply With Quote #1

I tried to change the command to open a menu in a source for a plugin, and came up with this error:

Error 010 Invalid function or declaration

Now the strange thing is, when I throw the plugins source and compile it without touching it at all, it compiles.

If I even change ONE thing to the source it gives me this error...

I tested it by adding a single letter to the "plugin version" and it was giving me this exact same error.

What am I doing wrong??
__________________
Ayyylmao

Last edited by malec321; 01-31-2018 at 00:59.
malec321 is offline
headline
SourceMod Moderator
Join Date: Mar 2015
Old 01-30-2018 , 16:54   Re: Error 010 Invalid function or declaration
Reply With Quote #2

It's impossible to guess what you're doing wrong with the information given. Show us the source of what you're trying to edit, and show the source with the edit made.

Last edited by headline; 01-30-2018 at 16:55.
headline is offline
malec321
Senior Member
Join Date: May 2009
Location: Los Angeles
Old 01-30-2018 , 16:59   Re: Error 010 Invalid function or declaration
Reply With Quote #3

Quote:
Originally Posted by Headline View Post
It's impossible to guess what you're doing wrong with the information given. Show us the source of what you're trying to edit, and show the source with the edit made.
I mean even if I change ANYTHING it doesn't matter what.

Here is my example:

I changed the cmd menu command from res and res_refresh (For admin) to sounds and soundsadmin

First is orig.

Second is edited.

Like I mentioned, I added the letter X to the plugin version by the author name and all that and left everything as is, still wouldn't compile
Attached Files
File Type: sp Get Plugin or Get Source (abner_res.sp - 250 views - 11.6 KB)
File Type: sp Get Plugin or Get Source (abner_res_edited.sp - 348 views - 11.6 KB)
__________________
Ayyylmao

Last edited by malec321; 01-30-2018 at 17:00.
malec321 is offline
nosoop
Veteran Member
Join Date: Aug 2014
Old 01-30-2018 , 18:13   Re: Error 010 Invalid function or declaration
Reply With Quote #4

You're saving the modified version of the file as UTF-8 with a Byte Order Mark (shows up as EF BB BF in a hex editor). Looks like the compiler doesn't like that.

Make sure to save it as UTF-8 without the BOM. Which text editor are you using?
__________________
I do TF2, TF2 servers, and TF2 plugins.
I don't do DMs over Discord -- PM me on the forums regarding inquiries.
AlliedModders Releases / Github / TF2 Server / Donate (BTC / BCH / coffee)

Last edited by nosoop; 01-30-2018 at 18:15.
nosoop is offline
malec321
Senior Member
Join Date: May 2009
Location: Los Angeles
Old 01-30-2018 , 18:18   Re: Error 010 Invalid function or declaration
Reply With Quote #5

I was using Notepad

Should I be using Notepad++?
__________________
Ayyylmao
malec321 is offline
nosoop
Veteran Member
Join Date: Aug 2014
Old 01-30-2018 , 18:32   Re: Error 010 Invalid function or declaration
Reply With Quote #6

Anything other than Notepad should be fine, I'd imagine.

Notepad with the ANSI encoding works if you're restricting unescaped text to ASCII; the other three encoding options have BOMs.
__________________
I do TF2, TF2 servers, and TF2 plugins.
I don't do DMs over Discord -- PM me on the forums regarding inquiries.
AlliedModders Releases / Github / TF2 Server / Donate (BTC / BCH / coffee)
nosoop is offline
malec321
Senior Member
Join Date: May 2009
Location: Los Angeles
Old 01-30-2018 , 21:08   Re: Error 010 Invalid function or declaration
Reply With Quote #7

Quote:
Originally Posted by nosoop View Post
Anything other than Notepad should be fine, I'd imagine.

Notepad with the ANSI encoding works if you're restricting unescaped text to ASCII; the other three encoding options have BOMs.
Thank you!

I knew it wasn't script error. Appreciate it
__________________
Ayyylmao
malec321 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:01.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode