Broke combat system somehow SOLVED!!!
Vitokin
03 Jun 2019, 14:16It used to work and randomly hit the enemy but ever since I made the stone object/weapon wearable I get a weird error when attacking the snake... Error running script: ERror compiling expression 'GetRandomInt (1,player.wepdmg)':FunctionCallElement: could not find function 'GetrandomInt(Int32; String) '
This is after i type attack snake while the stone is wielded in my primary hand/worn I'm so lost!
Wearing the Stone: Set variable player.weapon = expression this set variable player.wepdmg = expression "+object.itemdmg+"

Io
03 Jun 2019, 14:19What's happening here is the game looks for the GetRandomInt function. Normally it's described in the code as GetRandomInt(Integer, Integer). The game, however, thinks you entered the 'upper bound' as a String.
What this suggests to me is that you left, or at one point set, player.wepdmg as a string value - that is to say, "5" instead of just plain 5, which code does make a distinction between.
Vitokin
03 Jun 2019, 14:20Thx ill try everything ;)
Vitokin
03 Jun 2019, 14:24I managed to fix the issue

Io
03 Jun 2019, 14:50In that case, it's good form to add 'Solved' to your title.