SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 26/02/2020, 07:59 PM   #1
pollo97
Big Clucker
 
pollo97's Avatar
 
Join Date: Sep 2011
Location: Italy
Posts: 83
Reputation: 4
Default #include doesn't include

Hi to everyone, i'm creating a project using the modular programming technique and I got this error:

Code:
core/systems/connection/login/core.pwn(6) : error 017: undefined symbol "InitializeForLogin"
Now there are two files, one is core.pwn and the other is functions.pwn
In the main.pwn I included the files in this way:

Code:
... other #include

#include "core/systems/connection/login/core.pwn"
#include "core/systems/connection/login/functions.pwn"
The code of core.pwn:
Code:
#include <YSI_Coding\y_hooks>

public OnPlayerConnect(playerid)
{
	InitializeForLogin(playerid);
    .... 
}
The code of functions.pwn:
Code:
InitializeForLogin(playerid)
{
...
}
I tried to move the definition of "InitializeForLogin(playerid)" after "core" inclusion in the main, like this:
Code:
#include "core/systems/connection/login/core.pwn"
InitializeForLogin(playerid)
{
...
}
And works fine. So it seems is not including functions.pwn

What's wrong?



UPDATE:
I tried to modify this inclusion:
Code:
#include "core/systems/connection/login/functions.pwn"
Into:
Code:
#include "corewrong/systems/connection/login/functions.pwn"
corewrong folder doesn't exist and the compiler give me the error:
Code:
fatal error 100: cannot read from file: "corewrong/systems/connection/login/functions.pwn"
And it's fine, but when I change the file name with a wrong one, i get no error of "cannot read from file":
Code:
#include "core/systems/connection/login/wrong.pwn"
So it's seems the compiler isn't opening the file, I tried using either default compiler and Zeex's version.

Last edited by pollo97; 27/02/2020 at 10:31 AM.
pollo97 is offline   Reply With Quote
 

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
YouTube include doesn't work NeXoR Scripting Help 0 01/04/2016 09:19 PM
Clickable Textdraws dont work when i put #include <YSI\y_iterate> and #include <YSI\y_areas> ervinmasic Scripting Help 20 24/01/2016 09:01 PM
PAWN compiler doesn't include all files Callum98 Scripting Help 5 27/02/2015 06:29 PM
Include doesn't works Nightmare[TR] Scripting Help 3 20/06/2012 09:41 AM
Making an OnFilterScriptInit in an include without adding anything in the .pwn exepct the #include r3k1lLz_ Help Archive 6 06/01/2011 06:49 AM


All times are GMT. The time now is 06:16 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.