Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

sprite sheet animation problom
Started by ahmedmsomji Sep 03 2018 06:33 AM

4 replies to this topic

Best Answer cyberparkstudios , 03 September 2018 - 06:40 AM

it is looking for a   ',' comma at end of line 33 and line 34

[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

ahmedmsomji

[GLOBAL: userInfoPane.html]
ahmedmsomji
  • Observer

  • 12 posts
  • Corona SDK

i am animating a sprite for my game but as i hit play this came about 
i tried to fix it but yea not much luck help plz  :(
 
ERROR: Syntax error
                    main.lua:34: '}' expected (to close '{' at line 32) near 'height'
 
local options = 
{
width = 192
height = 199.68
numFrames = 4
}

local blob = graphics.newImageSheet ("blob_SS.png", options)

local blobsquence = 
{
name = "normal"
start = 1,
count = 4,
time = 300,
loopCount = 0,
loopDirection = "forward"
}

local blob1 = dispaly.newSprite (blob, blobsquence)

blob1 :play{}


 



[TOPIC: post.html]
#2

cyberparkstudios

[GLOBAL: userInfoPane.html]
cyberparkstudios
  • Contributor

  • 562 posts
  • Corona SDK

  Best Answer

it is looking for a   ',' comma at end of line 33 and line 34



[TOPIC: post.html]
#3

ahmedmsomji

[GLOBAL: userInfoPane.html]
ahmedmsomji
  • Observer

  • 12 posts
  • Corona SDK

it is looking for a   ',' comma at end of line 33 and line 34

thanks i will try it !



[TOPIC: post.html]
#4

ahmedmsomji

[GLOBAL: userInfoPane.html]
ahmedmsomji
  • Observer

  • 12 posts
  • Corona SDK

it is looking for a   ',' comma at end of line 33 and line 34

it  worked but now i am geting an error from line 41 

 

ERROR: Syntax error
                    main.lua:43: '}' expected (to close '{' at line 41) near 'start'


[TOPIC: post.html]
#5

XeduR @Spyric

[GLOBAL: userInfoPane.html]
XeduR @Spyric
  • Contributor

  • 763 posts
  • Corona SDK

Same problem. Different place.

When you create tables like that, you need to include "," at the end of every item in the table expect for the very last item, i.e. add comma to the end of line 42.

 




[topic_controls]
[/topic_controls]