Invalid function or declaration
Why aren't these 2 codings good enough to compile?
Code:
Code:
In fact, the 2 pieces of code are the same (code 2 is done much more differcult ;) ) (they both don't work) Whats the problem? TiA |
Are you implying that one of those works and the other gives you the error?
|
No, they both give me a compile error :(
(error 010: invalid function or declaration) |
Would you be so kind as to provide the entire source?
|
I hope you aren't doing that on the global scope.
|
Yes, I was actually doing it on a global scope
Could you expain me whats wrong with that then? :roll: (@brad ... the whole source doesn't matter, besides, I want to make it a surprise for someone else) |
Well, in small, you can only have these things on global scope:
Real statements like assigments are not allowed there (the only entry points in small programs are public functions; the host applications decides when to call those; so from a logical point of view, when would code placed outside any function be executed?) . If you want to simply initialize the global variable to the specified values, do: Code:
Maybe you'd like to declare the variable const as well if small supports it. edit: freaking typos! Brad: I'm CHUCK NORRIS and I HAVE A BEARD |
Perhaps your problem is that you have code outside of the a function. Either assign the values within your new statement or assign them somewhere else such as plugin_cfg.
Edit: Damn you and your quickness, PM! ;) |
Ah, thnx PM and Brad :D
|
| All times are GMT -4. The time now is 16:09. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.