https://workupload.com/file/L3hPuz3ax6F
If you go to the link above, you can see a screenshot of the error.
The code I wrote is below
For reference, the mod template I use is Ted2.
[ public float AttackSpeed
[Token(Token = "0x6001A53")] [Address(RVA = "0x17AAA40", Offset = "0x17AAA40", VA = "0x17AAA40")]
ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ
float(*old_AttackSpeed)(void *Player);
float AttackSpeed(void *Player) {
if([switches isSwitchOn:@"SpeedHack"]) {
return old_AttackSpeed * [[switches getValueFromSwitch:@"SpeedHack"] floatValue];
} // Note I'm closing the if statement here!!!!!!!!!!!!!
return old_AttackSpeed(Player);
}
void setup() {
//public int GetGhostMaxSpeed(); // RVA: 0x18DFFF4 Offset: 0x18DFFF4
HOOK(0x17AAA40, GetAttackSpeed, old_AttackSpeed);
// Slider Switch - used in hooking
[switches addSliderSwitch:@"AttackSpeedHack"
description:@"AttackSpeed Hack"
minimumValue:0.5
maximumValue:100
sliderColor:UIColorFromHex(0xBD0000)];
}
void setupMenu() {