SRL Archive - OSR Help

how to use {$i Whatever}


Foundry

2013-12-03 21:38:20

So I've been making my own include for a game and was wondering if there was any documentation on how to use the {$include bla bla bla} feature in Simba. I understand it is used to give the script access to other .simba files.

For example, could someone explain to me the difference between {$include_once example.simba} and {$i example.simba}? Also, while trying to figure it out I came across this {$f-}. What does it all mean???

NKN

2013-12-03 21:41:59

Pretty sure $include_once checks if the file isn't included, then it will include it
$include always includes.

Foundry

2013-12-03 21:47:04

From: NKN
Pretty sure $include_once checks if the file isn't included, then it will include it
$include always includes.


Well that makes loads of sense, thank you. But can anyone tell me what this does

{$f-}

EDIT: Also, if I declare a type(object/record) in a file I include, will I be able to use that type?

NKN

2013-12-04 06:49:55

From: Foundry
Well that makes loads of sense, thank you. But can anyone tell me what this does

{$f-}

EDIT: Also, if I declare a type(object/record) in a file I include, will I be able to use that type?


Not sure what {$f-} does, but yeah, if you declare a record in a file you include, pretty sure you can use it.

bonsai

2013-12-04 07:29:14

{$f-} will turn off calling of functions if you did not include the () at the end.

Without it, you can call a function just by using its name with no (). This can lead to some odd seeming things when you use pointers.