OFPEC Forum
Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: Rytuklis on 12 Mar 2013, 12:52:20
-
So what i'm trying to do is place an infotext function.
I place a module "Function" on the map, then i type this into init.sqf:
waitUntil {!isNil "bis_fnc_init");
["Line 1", "Line 2"] call bis_fnc_infoText;
Nothing happens.. nothing at all..
And when i use a trigger and paste this in the trigger initialization field, i can hear that "beep" typewriter sound once, but text doesnt appear.
-
You do have typo there, on the first line:
waitUntil {!isNil "bis_fnc_init");
They should both be curly brackets..
EDIT:
You should add -showScriptErrors startup parameter to the shortcut you launch the game from, without it you will not get any notifications on the screen if a script has a problem..
-
It says that "bis_fnc_infoText" is an undenified variable
Also, i added " " to the bis_fnc_InfoText and now its saying typestring expected
-
Are you by any change using vanilla Arma2?
The function is included in Operation Arrowhead only which means you either have to use OA or Combined Ops to able to use this function.
Although then again if you hear the typewriter sound it wouldn't happen in vanilla A2..
EDIT:
This is what I got in my init.sqf:
waitUntil {!isNil "bis_fnc_init"};
["Hello", "World"] call bis_fnc_infoText;
Works just fine.. :dunno:
-
Yea, i'm using vanilla. Probably thats the problem
-
Switched to combine ops, still the same problem happens
-
You probably should post up your mission/files, would be easier to troubleshoot..
-
Actually just got it fixed, it seems that WaitUntil command was not supposed to be there. IT works now :)
-
Well, I'd bet more on you having some sort of typo on the waitUntil line because it is infact needed ;) (not mandatory obviously, but still)
Like I pointed out already earlier in the code you quoted in the first post there is a typo..
What the line does is it ensures the functions module has properly intialized before any functions from it are called. I also base my claim on the fact that the waitUntil line is actual official method and also that it has always worked for me. :P