Advertisement
alestane

Correct type convesrion

Dec 30th, 2013
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. placesquare = function (spot)
  2.     spot = tonumber(spot)
  3.     if spot_availability[spot] >= "0" and spot_availability[spot] <= "4" then
  4.         spot[spot] = display.newImageRect( "spotsquare.png",25,25)
  5.     elseif spot_availability[spot] == "6" then
  6.         spot[spot] = display.newImageRect("nothing_spot.png",25,25)
  7.     elseif spot_availability[spot] == "7" then
  8.         spot[spot] = display.newImageRect("1_coin_spot_blue.png",25,25)
  9.     elseif spot_availability[spot] == "8" then
  10.         spot[spot] = display.newImageRect("2_coin_spot_red.png",25,25)
  11.     end
  12.     return 0
  13. end
  14.  
  15.     placesquare(spot[6])
  16.     spot[6].anchorX=0
  17.     spot[6].anchorY=0
  18.     spot[6].x=125
  19.     spot[6].y=10
  20.     spot[6].alpha=0.4
  21.     group:insert(spot[6])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement