Weird #include bug
#1

pawn Код:
//  Failas su funkcijomis
#include        "../filterscripts/Debug/debug_functions.pwn"
//  Transporto priemoniш rinkimasis
#include        "../filterscripts/Debug/debug_vehicles.pwn"
//  Instaliacijos failas    ( reikalingas tik tuomet, kai /scriptfiles/ kataloge nлra fs_debug.db failo )
#tryinclude     "../filterscripts/Debug/debug_install.pwn"

#if !defined VEHICLES
    #error NOT INCLUDED
#endif
Only the first file is checked and included. Even if files debug_vehicles ok debug_install doesn't exist, compiler shows no error or warning. file 'debug_functions' contains only variable, function and define.
Reply
#2

An include must have the extension " .inc" and not " .pwn". Try to change it to .inc and try it again
Reply
#3

Quote:
Originally Posted by Wesley221
Посмотреть сообщение
An include must have the extension " .inc" and not " .pwn". Try to change it to .inc and try it again
That's totally incorrect. You can include .pwn files like that.

OT: Make sure that you are not doubling up on functions which makes the compiler screw itself over for some reason. Make sure you only have one of each callback throughout all your scripts.
Reply
#4

Well, everything looks allright, here files:
Reply
#5

Quote:
Originally Posted by Wesley221
Посмотреть сообщение
An include must have the extension " .inc" and not " .pwn". Try to change it to .inc and try it again
#include can include all files, for example YSI includes .own files
Reply
#6

Quote:
Originally Posted by ******
Посмотреть сообщение
You are using "#tryinclude", which means that the compiler won't display a warning if the file doesn't exist - it is doing exactly what you asked it to!
I know, but compiler doesn't display a warning if file 'debug_vehicles' is missing, which is included in that way:

pawn Код:
#include        "../filterscripts/Debug/debug_vehicles.pwn"
debug_install is not included too, but it should be included. If I change code a little bit, like this:
pawn Код:
//  Instaliacijos failas    ( reikalingas tik tuomet, kai /scriptfiles/ kataloge nėra fs_debug.db failo )
#tryinclude     "../filterscripts/Debug/debug_install.pwn"
//  Failas su funkcijomis
#include        "../filterscripts/Debug/debug_functions.pwn"
//  Transporto priemonių rinkimasis
#include        "../filterscripts/Debug/debug_vehicles.pwn"
Then compiler includes file 'debug_install', but doesn't include next two, and doesn't show any error or warning. It checks only first include and ignores next includes.
Reply
#7

Up again
Reply
#8

Sorry, but I need to know whats wrong, up
Reply
#9

Sorry for another post, but I want to tell, that I've get rid of this problem . Strange, I've only renamed files ( deleted 'debug_' part ), and everything works fine now .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)