Jump to content
Sign in to follow this  
Dead3yez

getNumber / configFile help :)

Recommended Posts

_a = _this select 0;
_class = typeOf _a;
_maxspeed = getNumber (configFile >> "CfgVehicles" >> [b]"_class"[/b] >> "maxSpeed");

As above you should see what I'm trying to do. Obviously "_class" is not working and returning 0 for maxspeed.

Is there a way to do it which works? :)

ATM _a is a plane.

Share this post


Link to post
Share on other sites

You've got quotes around _class on the third line. Without testing, you should have:

_maxspeed = getNumber (configFile >> "CfgVehicles" >> _class >> "maxSpeed");

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×