14.03.2015, 13:39
Hey. I got some problems with reading files and I don't know why that's happening.
I'll try to explain with example:
First file content:
Second file content:
It doesn't shows any errors when including (I mean "can't read from file..."), but I can't use functions; f.e:
It shows
.
When I switch these includes (first include "secondfile.pwn", then "firstfile.pwn") it shows
So what's happening
I'll try to explain with example:
PHP код:
#include "data/some/other/folders/firstfile.pwn"
#include "data/some/other/folders/secondfile.pwn".
PHP код:
forward firstfilefunction();
public firstfilefunction()
{
return 1;
}
PHP код:
forward secondfilefunction();
public secondfilefunction()
{
return 1;
}
PHP код:
public OnGameModeInit()
{
firstfilefunction();
secondfilefunction();
}
Код HTML:
error 017: undefined symbol secondfilefunction()
When I switch these includes (first include "secondfile.pwn", then "firstfile.pwn") it shows
Код HTML:
error 017: undefined symbol firstfilefunction()