Jump to content
Sign in to follow this  
Ub3rObama

A non helpful error

Recommended Posts

This line right here gives me an error:

	_soldier addEventHandler["Killed",{[nil,(_this select 1),"loc",execVM "client\money.sqf"] call RE;}];

The error is:

Error in expression <rC:\Users\name\Documents\ArmA 2 Ot>

Error position: <\Users\nameDocuments\ArmA 2 Ot>

Error Invalid number in expression

But the code still works exactly as intended. So whats the problem?

Also I read in a thread to use CBA instead of Multiplayer Framework, but CBA is an addon? Wouldn't all clients need it as well?

Share this post


Link to post
Share on other sites

[nil,(_this select 1),"loc",execVM "client\money.sqf"] call RE;

should be

 [nil,(_this select 1),"loc",[color="#FF0000"]rEXECVM[/color] "client\money.sqf"] call RE;

not sure it works inside the eventhandler -if it doesnt - you may want to use a spawn command - e.g

 _soldier addEventHandler["killed", { [(_this select 1)] spawn money; }];  

in your init.sqf

money= compile (preprocessFileLineNumbers "client\money.sqf");

client\money.sqf

money= { have your script in here. you will have to set the caller . i.e _killer = _this select 0;  };

Share this post


Link to post
Share on other sites

Thanks I managed to use:

_soldier addEventHandler["Killed",{[nil,(_this select 1),"loc",rEXECVM,"client\money.sqf"] call RE;}];

(Notice the comma) Which works well, but I'm wondering if your second method would be better performance wise, since the code is already loaded and is simply only being called in new thread, but then again execVM is also doing a very similar thing.

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  

×