Mapping Issue
#1

Here's another addition of: Damn streamer, back at it again with the weird shit!

So the way I do mapping is fairly simple, but a little complex. I keep files in an include folder and use the #include tag under OnGameModeInit so it makes files easier to create, edit, etc.

Here is a snip:

PHP Code:
public OnFilterScriptInit()
{
    for(new 
iMAX_PLAYERSi++)
    {
        
TogglePlayerControllable(i0);
        
SetTimerEx("MappingReload"GetPlayerPing(i) * 40"i"i);
        
RemoveBuildings(i);
    }
        
// bunch of other #include's.
    #include ./includes/Utilities/World.pwn
return 1// Not indented on purpose. Loose indentation errors if it is because none of the code in the files are indented.

And it was working great! But now I went to add to a file and recompile and now some mapping isn't showing up.
So lets say I have an interior in file 'Interior' and an exterior in the file 'Exterior'

If I include Exterior before Interior, none of the interior mapping shows up. If I include Interior before Exterior, none of the exterior mapping shows up. It's the damnedest thing I've ever seen.

Anyone know why?

Edit: The files just have CreateDynamicObject lines.
Reply
#2

Update: I moved 'exterior' to a different folder and included it in a different position. This fixed the issue with 'interior' but I'd still like to know why this is happening and how to fix it.
Reply
#3

Im goddamn sure nobody's understanding you.
Would you explain more simple please
Reply
#4

Some other guy also had a problem with includes, take a look

https://sampforum.blast.hk/showthread.php?tid=609287
Reply
#5

Don't #include files go at the top of your script not ongamemodeinit?...
Reply
#6

Quote:
Originally Posted by CSLangdale
View Post
Don't #include files go at the top of your script not ongamemodeinit?...
It's maps lol
Reply
#7

That's why I asked mine and all in gamemode not in includes haha
Reply
#8

Quote:
Originally Posted by CSLangdale
View Post
That's why I asked mine and all in gamemode not in includes haha
Using includes is better
Reply
#9

Yea I wouldn't have a clue how to make the include haha
Reply
#10

Use backslashes to traverse folder structures. That ought to solve the original problem. Forward slashes tend to bug A LOT if the total length of the path exceeds ~25 characters.
Reply
#11

#include "./bla/blablabla/blablabla.pwn"
As far as I know this line has a limit, I believe its 20-something and when you reach that, 2 files with almost same path won't get included, try to shorten the path, get it closer to the main file and it will fix the problem (at least thats what happened for me)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)