It looks like you're new here. If you want to get involved, click one of these buttons!
Assertion failed!
Program: C:ORX TutorialsinFirstProject_d.exe
File: ....srcCollisionShapes2PolygonShape.cpp
Line: 137
Expression: edge.LengthSquared() > 1.192092896e-07F * 1.192092896e-07F
For information on how your program can cause an assertion failure, see the Visual C++ documentation on asserts
Comments
Usually this error happens when you have an object with a "bad" collision box; -- and THAT only ever happens (in my experience) when you link to an incorrect image, or forget to link an image.
At the top of that tutorial there is a link to a zip with two new files in it, can you please make sure you've got those?
Hope that helps!
- Grey.
edit: this file (the zip is made with 7zip, if you have trouble opening it, let me know and I'll try to make a new one.)
edit2: data/phys/wall.png and data/phys/box.png
Somebody help me please!
Also, Grey, you should put the source code for each tutorial up for download.
If you get the same message it means you still have a physics body with a zero size. Probably due to a missing texture or a wrong path. If you post an archive of your whole project I can have a look if you want.
Firstly; I don't post complete source for each of my tutorials, because the intent is to get people learning
Cactus, that error, as Iarwain has said, is a problem of a physics body with a size of zero. Did you have trouble with any of the other zip files? I've made a new file with all the needed images inside, here, I'd also -highly- recommend grabbing 7Zip (it's free!) but obviously that's up to you.
As for posting an archive; you can put it on drop-box or something, anywhere really, then use or if you'd like you can email me the file directly ( the.grey.1 [at] gmail.com ) and I'll take a look as soon as I've some free time. (or post it here for others to look at too if that's easier.)
Hope that helps
- Grey.
I've just looked through your files;
This appears to be the reason for your assert:
Interaction.ini
Give that a fix and see what happens. (there is no 'wall.png' folder
- Grey.
edit: Also, make sure you read your console output. You would have been getting a warning in the console telling you that a texture was not found, or failed to load etc. That could have helped you find the problem too.
[][]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[][]
as for the problem, you've done some copy/pasting without reading
HorizontalWallGraphic -- you've got two copies of the 'repeat' variable. Try having only one
Thanks for all the help Grey! It works now, I think my biggest problem is me going too fast. Thanks again!
--Connor
Ok, hopefully last one.
I'm at:
and when I build I get:
I placed the code underneath
case orxEVENT_TYPE_PHYSICS:
and within the
switch(currentEvent->eType)
Any help please? :P
edit: IGNORE ALL OF THE ABOVE!
I've just looked through your code again, you seem to have missed a step earlier in tutorial 4, where you add in input events!
Do a search for "case orxEVENT_TYPE_INPUT" in the tutorial and you should see some code dealing with pressing buttons on/off. You'll need to implement that, and then make the changes further down in the tutorial (the ones you were just trying to make.)
orxINPUT_EVENT_ON:
I still get an error with that.
So those two have the same value. How exactly would I change that?
They should not be used in the same switch statement at all: switch(_pstEvent->eID) != switch(_pstEvent->eType) or all hell will break loose.
I've tweaked the tutorial dealing with that specific event handler change; please take a look at this section again.
Good luck!
[code]
1>c:orx tutorialsfirstprojectsourcestandalone.cpp(194): error C2360: initialization of 'EventPayload' is skipped by 'case' label
1> c:orx tutorialsfirstprojectsourcestandalone.cpp(185) : see declaration of 'EventPayload'
1>c:orx tutorialsfirstprojectsourcestandalone.cpp(223): error C2360: initialization of 'ObjectName' is skipped by 'case' label
1> c:orx tutorialsfirstprojectsourcestandalone.cpp(189) : see declaration of 'ObjectName'
1>c:orx tutorialsfirstprojectsourcestandalone.cpp(223): error C2360: initialization of 'EventPayload' is skipped by 'case' label
1> c:orx tutorialsfirstprojectsourcestandalone.cpp(185) : see declaration of 'EventPayload'
1>c:orx tutorialsfirstprojectsourcestandalone.cpp(242): fatal error C1075: end of file found before the left brace '{' at 'c:orx tutorialsfirstprojectsourcestandalone.cpp(175)' was matched
[/code]
How do you initialize the, pointers? I would have done that on my own but I'm not really sure how.
Sorry if I'm being a bother. =","BBCode
Though those are pretty basic C errors and I'd recommend following some tutorials/reading some C books in order to learn how to deal with them.
The last error tells you that you didn't close a curly bracket correctly and former ones mean that you didn't write your case statements correctly with respect to local variables initialization.
Good luck!
Programming, I love it and hate it. o.0
It's missing a closing } and a break; statement at the very minimum.
It's probably missing much more if I judge by the its last line being a variable definition without initialization (and all former initialized variables aren't also used).