Home
Products
Community
Manuals
Contact
Login or Signup

Functions help

BlitzPlus Forums/BlitzPlus Beginners Area/Functions help

Grunthunter(Posted 1+ years ago) #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 1+ years ago) #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 1+ years ago) #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 1+ years ago) #4
thanks