Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 help turing dies with no error codes
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
lufthansa747




PostPosted: Fri Dec 25, 2009 10:20 pm   Post subject: help turing dies with no error codes

What is the problem you are having?
program dies with no error dies at the bolded line in the code below but the enitre game is attached

if index ("rstuvRSTUV", virtualMap (floor ((player -> x + 50) / 50), 13 - floor ((player -> y + 27) / 50))) > 0 then
var pos : int
pos := ord (Str.Lower (virtualMap ((player -> x + 50) div 50, 13 - (player -> y + 27) div 50))) - ord ("r") + 1
%Check if you have the key to open the door
if keys (pos) -> gotKey = true then
var numFrames : int
var delayTime : int
if doors (pos) -> doorType = "h" then
numFrames := Pic.Frames ("HorDoorAn.gif")
var pics : array 1 .. numFrames of int
Pic.FileNewFrames ("HorDoorAn.gif", pics, delayTime)
Pic.DrawFrames (pics, doors (pos) -> x, doors (pos) -> y, picCopy, numFrames, delayTime, true)
elsif doors (pos) -> doorType = "v" then
numFrames := Pic.Frames ("VerDoorAn.GIF")
var pics : array 1 .. numFrames of int
Pic.FileNewFrames ("VerDoorAn.GIF", pics, delayTime)
Pic.DrawFrames (pics, doors (pos) -> x, doors (pos) -> y, picCopy, numFrames, 50, true)
end if
end if
end if



Finish the Level.rar
 Description:
this is the game

Download
 Filename:  Finish the Level.rar
 Filesize:  45.55 KB
 Downloaded:  89 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
lufthansa747




PostPosted: Sat Dec 26, 2009 10:26 am   Post subject: Re: help turing dies with no error codes

i was playinh around with the code and i was able to get the error "segmentation violation " on the bolded line in the code above. what does that mean and how can i fix it
Tony




PostPosted: Sat Dec 26, 2009 2:41 pm   Post subject: RE:help turing dies with no error codes

It likely means that something is breaking internally. Perhaps there's a problem parsing the GIF file the right way. Try this with a different GIF file, and see how that behaves.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
lufthansa747




PostPosted: Sat Dec 26, 2009 3:06 pm   Post subject: RE:help turing dies with no error codes

ok i tried it with another gif and it wokred fine so what does that mean. do remake my gif or what
TheGuardian001




PostPosted: Sat Dec 26, 2009 3:09 pm   Post subject: Re: help turing dies with no error codes

Yes, it's most likely a corruption in the file. Try opening it in an editor and resaving it, and if that doesn't work try making a new one.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: