16.06.2015, 09:45
Quote:
The problem is that PHP is way more dynamic. Pawn is supposed to be one file to edit small stuff.
I have had the same problems with my modulair design, so the big parts, I had in my main file. Things as mysql_connect. I am not competent enough to give you a real answer, but I can tell you that I would've probably done it the same way. |
I think i just don't know something and it's possible.
There one more question: is code in includes executing after including?
It's strange:
main.pwn
Код:
#include <a_samp> #include <a_mysql> #include "../include/mysql.inc" ...some query with mysql handler...
Код:
#include <a_samp> #include <a_mysql> #define HOST "localhost" #define USER "root" #define DB "test" #define PWD "12345" new mysql; mysql = mysql_connect(HOST, USER, DB, PWD); mysql_log(LOG_ALL); if (mysql_errno(mysql) != 0) print("MySQL is broken");
Код:
\../include/mysql.inc(11) : error 010: invalid function or declaration \../include/mysql.inc(14) : error 010: invalid function or declaration