SA-MP Forums Archive
Function in File - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Function in File (/showthread.php?tid=125083)



Function in File - Daren_Jacobson - 02.02.2010

I was wondering if it is possible to call code that is in a file that is loaded on run-time.

If this doesn't work I will make a parser that reads the code from the file and finds out what to do, but that would be thousands of lines of code.

Thanks.


Re: Function in File - Joe Staff - 02.02.2010

As far as I know, there is no string-to-function code. This could be made with a plugin for faster processing and seemingly less work. Or this could be done with pawn code. I assume it would get complicated with creating new variables and control structures(if,for,while,switch).


Re: Function in File - Daren_Jacobson - 08.02.2010

Time to learn C
Excited about this project.


Actually, It will have to be able to be called by CallRemoteFunction, and it must be able to access all vars in the GM. I might be figuring out another way.


Re: Function in File - Daren_Jacobson - 10.02.2010

Does anyone know how to maybe do a #include on runtime (it can be on runtime, not compile, not while the server is running, basically read a file, and if it says, loadfrom=File.inc then use those functions.


maybe i could use #emit?