HELP ! Script Modules
#1

Guys I have some issues here that part of Modular Script , I am doing so :

To call include .. Follow the Example..


pawn Код:
#include "../include/hello.inc"
and so on hello.inc

pawn Код:
Hello = TextDrawCreate(320.0, 240.0, "Hello World!");
Doing so could with many textdraws, but in some cases they bug position.. the TextDraw is not bug, because this bug only occurs when "split into more than one include some textdraws .." if you leave them in a include not only bug occurs .. am I doing wrong ??

I am creating an include "global" joining all textdraws, and creating other with with textdraws ..

pawn Код:
#include "../include/textdraws/hello.inc"
#include "../include/textdraws/hello2.inc"
#include "../include/textdraws/hello3.inc"
Sorry my english .. is I got no answer in my bord.
Reply
#2

Hi Holl,

I'd suggest doing the following.

Layout
{ScriptName}.pwn
--| {ScriptName}
-----|Core
-------| {Modules}


So when you're including a module it follows a simple layout eg.
pawn Код:
#include "Script/Core/Master/Account.pwn"

NOTE: When you're including other modules in a module you must follow the same include method as "../mod.pwn" will not work.
Screenshots: http://prntscr.com/828854 | http://prntscr.com/828890
Reply
#3

Quote:
Originally Posted by zT KiNgKoNg
Посмотреть сообщение
Hi Holl,

I'd suggest doing the following.

Layout
{ScriptName}.pwn
--| {ScriptName}
-----|Core
-------| {Modules}


So when you're including a module it follows a simple layout eg.
pawn Код:
#include "Script/Core/Master/Account.pwn"

NOTE: When you're including other modules in a module you must follow the same include method as "../mod.pwn" will not work.
Thanks man ! it's a shame to error when I pull the module out of the folder includes the pawno .. I did, but in this case gave bug.
Reply
#4

Quote:
Originally Posted by Holl
Посмотреть сообщение
Thanks man ! it's a shame to error when I pull the module out of the folder includes the pawno .. I did, but in this case gave bug.
That code is an example from one of my scripts, basically a folder/file layout that shouldn't cause an issue when you implement it correctly.

Placing your module sections into the pawno include folder isn't a good idea in any respect, you're better off doing as I suggested having a folder/file layout that can be easily navigated to add/remove and edit files, and make it easier to include said files into the main script.

I'm not going to out-right solve the problem for you, but give to assistance in finding that sweat stop where you can get your gamemode/filterscript done effectively and productively.
Reply
#5

Quote:
Originally Posted by zT KiNgKoNg
Посмотреть сообщение
That code is an example from one of my scripts, basically a folder/file layout that shouldn't cause an issue when you implement it correctly.

Placing your module sections into the pawno include folder isn't a good idea in any respect, you're better off doing as I suggested having a folder/file layout that can be easily navigated to add/remove and edit files, and make it easier to include said files into the main script.

I'm not going to out-right solve the problem for you, but give to assistance in finding that sweat stop where you can get your gamemode/filterscript done effectively and productively.
I will do this their own way, to avoid future problems like this .. what happened .. thanks again. +Rep add..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)