Posts: 889
Threads: 4
Joined: Mar 2013
Reputation:
0
If you call the function before including the file, the compiler will not know about the function yet. Try including the file in the first few lines of your script before loading anything else. See if that makes a difference.
EDIT: I should learn to read, my bad. The way you describe it, it should work. Will look into it when I have some free time.
Posts: 617
Threads: 129
Joined: Feb 2014
Quote:
Originally Posted by Sellize
So in gamemodes/gm.pwn I have the following on line 2505
Код:
#include "../gamemodes/inc/cell_main.inc"
The file in gamemodes/inc/cell_main.inc has the follow public (and forwarded) function:
PHP код:
public OwnsCellphone(playerid) {
return (PlayerInfo[playerid][pPnumber] != 0);
}
In the gamemode, I only use this function AFTER the file has been included, and still it gives me the following error:
Код:
error 017: undefined symbol "OwnsCellphone"
(this happens for other functions from cell_main as well)
|
I believe includes are suppose to be in your samp folder/pawno/includes
Posts: 889
Threads: 4
Joined: Mar 2013
Reputation:
0
I believe 1fret is right. I've used includes from my gamemode folder once, however those had the .pwn extension and behaved exactly the same.
Posts: 708
Threads: 140
Joined: Jan 2013
Reputation:
0
No, you can in fact include "modular" parts of your script via the gamemodes folder. It works for like 20+ other modules in the script, just not this one.
Posts: 708
Threads: 140
Joined: Jan 2013
Reputation:
0
Bump. Still had no solution to this
Posts: 294
Threads: 12
Joined: Sep 2015
Reputation:
0
public do not mean that. do you have other file also called call_main?