Post your questions, suggestions and experiences regarding game design, integration of external libraries here. For irrEdit, irrXML and irrKlang, see the ambiera forums
I'm really lost with this and would like some help...
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
does really nobody knows what i'm doing wrong or how i could do it?
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
Thats the point their is no compile error it compieles but it wont read the data.
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
I don't see where you defined the config variable. Might be a problem with its scope. Try to output the config variable before returning from your reading function in order to check for correct values.
what?
sry but i dint catch that....what should i do?
Isn't there someone out here who already did this and could help with a modification in my code?
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
You have a struct (probably object of some class) named config in your code. You refer to config.x and config.y in the lines you read the attributes. This object has to be created somewhere. It apparently is because otherwise your app would crash, but it could be destroyed before you can access the values. This depends on the way you create this object. So try to output the values of config.x and config.y at the end of your posted method. That way you can check if the values are correctly read from the file. If so there is something wrong with the config object. If not you have to fix the way of reading attributes.
Ok i already did that so there must be a problem with reading the attributes
but i don't know where the problem is.
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
Does it enter the if statement, i.e. is at some point the strcmp successful such that Attribute method is called? Does getNodeName return char* or wchar_t* ?
should return char* cause i use the extern irrxml parser.
but i don't know if the atribute methode is called. it doesn't return code errors it only doesn't do anything
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
Just add a cout to both if statements (and don't forget curly braces) to check if they are reached. And add -Wall (or equivalent) to your compiler options to avoid too simple errors.
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
So it's not with the attribute reading, but the XML parser does not reach the correct node. Check the API and examples if you have to add some default handling for the other nodes of your file. Maybe add output to the main loop to check which nodes are visited and which are not.
Thanks hybrid but u aren't helping...lol....why isn't this working??????AHHHHHHH
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.