Fast help needed! Invalid function or declaration on a commented line
#1

Hi, i have a very big problem :/ I think i f***** up something in my GM because it was working very well and i wanted to add fixes include and was transforming some filterscript to a include to make fixes.inc work better, then i did some weird shit with the y_hooks (i needed to hook OnPlayerConnect in that include i wanted to make from a filterscript) because i was doing:
Код:
Hook:iy_OnPlayerConnect(playerid)
and it was giving some errors that OnPlayerConnect is never used (pointing to the last line in my gamemode file) and then somehow i got a full page of errors, but i fixed them though
And now i have a very weird problem, im using the camera fix made by https://sampforum.blast.hk/showthread.php?pid=2362690#pid2362690 exactly as it is, and i have Y_hooks included only in that include file (so i dont include it 2 times) and after i screwed up something with that hooks, now i get a very weird error:
Код:
camera.inc(1) : error 010: invalid function or declaration
As you can see in that include file, line 1 is just a comment so i have no idea whats wrong :/
When i delete the camera.inc include and include y_hooks manually in my gamemode (#include <YSI\y_hooks>) it compiles succesfully, and as for now everything works (except the camera of course) but im pretty sure something is wrong in some include/whatever else. I have counted all the braces ({ and }) and they are OK, but i did it only in my custom-made includes and those who i have edited. Braces in gamemode were OK also so i have no idea whats wrong.
My include list:
Код:
#include <a_samp>
#include <config> //Just some variables and redefinitions (like MAX_PLAYERS)
#include <crashdetect>
#include <zcmd>
#include <mysql> //StrickenKid's
#include <sscanf2>
#include <md5>
#include <strlib> //Slice's
#include <camera> //This thing causes the error
#include <foreach> 
#include <streamer>
#include <build_info> //Include containing some build info that is automatically updating before every compilation
EDIT
That camera include was working before ! And i dont have any way to backup the working gamemode :/
Reply
#2

Anyone?
Reply
#3

There's a problem with your camera.inc, whatever it is nvm just re-install the include.
Reply
#4

Well, i have fixed it !
Thanks to people on IRC who helped me (Southclaw, Ricardo, dugi, iZN)

The problem lays somewhere in the encoding, good people on IRC suggested me to change the encoding (im using Notepad++ to eedit and compile my files) and i dugi suggested me to open them in pawno and not in notepad++, and thats how i found out whats wrong! In every include file on my first line were some incorrect characters ( in my case) and thats why compiler was throwing out 'invalid function or declaration', they were not visible in Notepad++ though. So the fix is to open every include/script where you have this error with PAWNO and not any custom editor and check for characters like these, delete them and save the file.

Thank you once again
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)