This is the code (corona SDK btw), it is calling a physicsdata (unimportant).
r = math.random(1,5)
local scaleFactor = 1.0
local physicsData = (require "retro").physicsData(scaleFactor)
physics.addBody( enemy, physicsData:get(r) )
The r in
physicsData:get(r) )
has to be inside speech marks to work (I tested).
how can the r variable be string-ilised? ( 😀 )
If you need a string,
For example,
If you really need quotes in the string (I doubt you do):