Halvhjearne / HALV_takegive_crypto

modify epoch player crypto from client
1 stars 0 forks source link

HALV_takegive_crypto broken since Epoch update version 0.3.8 #1

Open ReDBaroN1 opened 8 years ago

ReDBaroN1 commented 8 years ago

Hey Halvhjearne, any chance of a new version of this for the latest epoch update?

I use both your service point and blackmarket traders but, since the update I've had to turn them off because they don't credit/debit any crypto....

Thanks

ReDBaroN1 commented 8 years ago

This is the error in the server rpt: 3:13:45 Error in expression <'; _vars = _player getVariable['VARS',[]+EPOCH_defaultVars_SEPXVar]; _curcrypt => 3:13:45 Error position: <+EPOCH_defaultVars_SEPXVar]; _curcrypt => 3:13:45 Error +: Type code, expected Number,Array,String,Not a Number 3:13:45 File mpmissions\__cur_mp.Altis\custom\HALV_takegive_crypto.sqf, line 9

vbawol commented 8 years ago

@ReDBaroN1 @Halvhjearne Check out this function that should do the exact same thing as your takegive_crypto function

https://github.com/EpochModTeam/Epoch/blob/release/Sources/epoch_server/compile/epoch_trading/EPOCH_server_effectCrypto.sqf#L16-L17

Done server side only:

[_player,100] call EPOCH_server_effectCrypto; // adds 100
[_player,-100] call EPOCH_server_effectCrypto; // removes 100
ReDBaroN1 commented 8 years ago

Thanks vbawol. He-Man modified it for me in the end as I couldn't get it to work. Haven't seen or heard from Halv on Epoch for a while. Appreciate the reply though.