Computer Science Canada help turing dies with no error codes |
Author: | lufthansa747 [ 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 |
Author: | lufthansa747 [ 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 |
Author: | Tony [ 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. |
Author: | lufthansa747 [ 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 |
Author: | TheGuardian001 [ 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. |