Functions help

BlitzPlus Forums/BlitzPlus Beginners Area/Functions help

Grunthunter(Posted 2005) [#1]
Hey guys,
I'm new to this language and I was wondering what some of the best ways of putting a function into the main source.
Thanks!


Rob Farley(Posted 2005) [#2]
I think you need to explain what you're wanting to do, functions just work like additional commands ie

function add(a,b)
return a+b
end function

if add(10,20) = 30 then print "10 + 20 = 30"


WolRon(Posted 2005) [#3]
I usually add all of my functions after the main source but before any supporting data in the file.

Kinda like this:

Initializations
Main source
Functions()
Functions()
Data
Data


Grunthunter(Posted 2005) [#4]
thanks