SA-MP Forums Archive
Where is the problem? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Where is the problem? (/showthread.php?tid=280713)



Where is the problem? - LZLo - 02.09.2011

Quote:

pawno\include\filemanager.inc(5) : error 010: invalid function or declaration
pawno\include\filemanager.inc(5) : error 001: expected token: ";", but found "("

PHP код:
native file_move(file[],destination[]); // Moves a file
native file_delete(file[]); // Deletes a file
native file_create(file[]); // Creates a file
native file_write(file[],text[],mode[] = "a"); // Writes in append mode to a file, option to set write mode, append mode is default
native file_read(file[],storage[], sizeof(storage)); // Saves to the specified string
native file_log(); // Adding this will enable logging
native file_exists(file[]); // Check if a file exists
native dir_create(directory[]); // Creates a new directory
native dir_delete(directory[]); // Deletes a directory (Directory MUST be empty!)
native dir_exists(directory[]); // Check if a directory exists 
what can be the problem?


Re: Where is the problem? - Kingunit - 02.09.2011

Line number 5 is?


Re: Where is the problem? - Vince - 02.09.2011

You cannot create new native functions yourself unless you're making a plugin. To make them show up in the right hand side of Pawno, wrap them in a comment block with /* and */.


Re: Where is the problem? - LZLo - 02.09.2011

It is the file manager form a beta tester


Re: Where is the problem? - [MG]Dimi - 02.09.2011

You tried to compile pawno include? -.-

Never do that. Just place it inside pawno/Includes folder. Pawno doesnt use pwn or amx files. It uses inc!


Re: Where is the problem? - Amel_PAtomAXx - 02.09.2011

Quote:
Originally Posted by [MG]Dimi
Посмотреть сообщение
You tried to compile pawno include? -.-

Never do that. Just place it inside pawno/Includes folder. Pawno doesnt use pwn or amx files. It uses inc!
OMG What ?
pawn Код:
pawno\include\filemanager.inc(5) : error 010: invalid function or declaration
pawno\include\filemanager.inc(5) : error 001: expected token: ";", but found "("



Re: Where is the problem? - =WoR=G4M3Ov3r - 02.09.2011

This is an include, just leave the .inc as it is, copy it into your pawno > include folder, and when you wanna use it, open your .pwn and under

PHP код:
#include <a_samp> 
Put this

PHP код:
#include <filemanager> 
You don't need to compile the Include lol.


Re: Where is the problem? - =WoR=G4M3Ov3r - 02.09.2011

Quote:
Originally Posted by Nathy.SA-MP
Посмотреть сообщение

when compile the Script, the PAWNCC compiles include too.
No, it doesn't, Clearly you don't even know the difference between a .inc and a .pwn do you ?


Re: Where is the problem? - Vince - 02.09.2011

Quote:
Originally Posted by G4M3Ov3r
Посмотреть сообщение
No, it doesn't, Clearly you don't even know the difference between a .inc and a .pwn do you ?
Do you? Don't think so, because he's right. The preprocessor basically copies every include into the gamemode and only then starts to compile.


Re: Where is the problem? - =WoR=G4M3Ov3r - 02.09.2011

Quote:
Originally Posted by Vince
Посмотреть сообщение
Do you? Don't think so, because he's right. The preprocessor basically copies every include into the gamemode and only then starts to compile.
Actually, when you include it, it does, if not it won't come near the .inc, and basically, what LZlo did is trying to compile the .inc