New account registration is temporarily disabled.

MCBICK'S PROFILE

Search

Filter

[RM2K3] DynRPG Compiling Error

For the first example I was supposed to show:
int* b;
And for the second example I missed an operator and should be this:
int* b = &a;
int* b = *a;
int c = b;

Also is something like this the same declaration:
RPG::Battler* battler;
//Is the following line the same declaration as the above line?
int* battler = &RPG::Battler;

I've been reading up on pointers, dereferencing, and referencing and I feel like I understand it and then I practice it, but I still some how keep getting errors. I don't think this is supposed to be confusing at all, but I keep confusing myself when applying these operators.

[RM2K3] DynRPG Compiling Error

So I think I understand what you're saying, but I keep running into conversion errors. What is the difference between these two declarations?
int* b = &a;
//and
a* b;

Also what is the difference between these two declarations?
int* b = &a;
//and
int* b = a;
//What would c equal if a = 10 in this example, for both declarations of b?
c = b;

I am guessing the value of c for both declarations would be 8, but then what is the difference of using one or the other?

[RM2K3] DynRPG Compiling Error

@Kazesui
I see now that was a bad example. I'm trying to learn a method that converts the value stored in a pointer's location to an int.
//Example
int a;
Namespace::class *Ptr;
a = &Ptr->variable;
//This results in an invalid conversion of pointer to int

Does that make sense?

[RM2K3] DynRPG Compiling Error

Does anyone know how to make this conversion work?
int Actor;
RPG::Battler* battler; //I am using the DynRPG callback onBattlerDrawn for this example.
Actor = &battler; [code c++][/code]
//This line of code doesn't work either, similar error message:
//Actor = battler; 
//error: invalid conversion "RPG::Battler**" to "int"
I am trying to convert the value of battler(the current acting Hero/Monster) to an int variable, Actor. I don't want to store the address of battler, but the value that exists in the address of battler. Does that make sense?

Also I am aware I can get the battler value through something like this:
RPG::battleData->currentHero;
This isn't what I am looking for though. I am trying to learn how to convert the value stored in a pointer's address to an int variable.

[RM2K3] DynRPG Compiling Error

Oh, when I made that remark about lower case letters I meant with DynRPG classes only. I never knew the reason why so many classes in DynRPG started with lower case letters until now.

I think I understand what you mean about the classes overlapping with the memory in rm2k3 software. I actually altered some memory values myself when I was working with keyboard inputs, to try to force key inputs. Now that you mention how I interact with classes I suppose it is true, I have only been working with one instance of a class at a time, usually DynRPG, so I have forgotten the utilization of multiple instances. Up until now I have mostly used structs instead of classes as I am uncertain why I would use a class over a struct. My main cpp file contains all the structs while I have a header with all my non-DynRPG functions and so far this has proven sufficient. I am only doing simple stuff though. I imagine classes would be more useful with more complex coding.

author=Kazesui
RPG::menu->winSkills->winInfo->y = 120;
I should have checked SceneMenu page or the header file more carefully. I can't believe I missed that.

I have been reading up on polymorphism and it has given me ideas on how to further manipulate rm2k3 objects. I started with only wanting to create a custom battle system, but the more I learn about c++ and DynRPG the more I realize how much control I have over the rm2k3 software, so I am currently working to revamp it to something akin to Dragon Quest.

[RM2K3] DynRPG Compiling Error

So that's why some classes are referred to with a lower case starting letter! This makes so much sense now!

When I mention instantiated objects, I meant specifically the ones the coder refers to and not the one that is declared in Dyn RPG, but now I have another question regarding this. In the header, the BattleData class has no static members. It is the same in the other header for the WindowMenuSkill class. Aside from the lower case letter needed for battleData the class object winSkill and winInfo are identical, though the latter inherits the Window class properties. So how and why are these two members so different to work with? Am I misunderstanding something here? There is a static reinterpret cast for BattleData, but does that change the class members to static?

I am trying to edit existing properties in rm2k3, such as menu windows. For most of the Window objects that rm2k3 creates I have been able to figure out how to manipulate them, albeit painstakingly, but there are a few Window objects like winInfo that I have issues manipulating. I will continue to read up on polymorphism and continue to experiment with winInfo.

[RM2K3] DynRPG Compiling Error

I understand about instantiated rm2k3 objects, so I stay away from that. I am not sure what you mean by having an instance of WindowMenuSkill which has been instantiated as Window. As far as I can tell the objects in that class are static and can only be called, not instanced.

I tried using the dynamic cast operation, but get the error "not a polymorphic source". Ill continue to try using that type of method to see if I can get it to work.

[RM2K3] DynRPG Compiling Error

Does anyone know what is expected for this line of code?

RPG::WindowMenuSkill->winInfo->y = 120;
//Error: Expected unqualified-id before '->winInfo->y = 120' token

This is the code I am pointing to in the DynRPG Window.h;

class WindowMenuSkill : public Window {
		public:
			int heroId; //!< Database ID of the hero selected
			Window *winInfo; //!< The sub-window for the skill description
			Window *winHeroInfo; //!< The sub-window for the selected hero information
				int _unknown_84;
			DList<int> *skillSubsets; //!< Zero-based Array of skill subsets. Unsure about this though...
			bool isSkillSubset; //!< Is the selected skill a subset?
			//Window *winHeroMp; // ????

			void refreshSkills();
	};
I am guessing because WindowMenuSkill has the properties of class Window I have to point to the object in a different way than what I am currently using, but I have tried pointing to it several different ways, all of which results in the same error.

[RM2K3] Problems with "Wait for Key Input" Command

I'm not sure if this would work, but instead of using the wait for key command in your event commands try creating an invisible/empty message box, with your picture ontop of it, displaying what you'd like. This will stop any event commands from executing until the player exits the message box, by pressing a button, at which point the event command will continue executing the rest of the commands in that page.

I've never used this version of rm2k3, so I'm not sure if you can overlay pictures ontop of message boxes or create an invisible message box, but if you can then this should solve your problem.

[RM2K3] How to make games run smoothly on modern PCs

If you have your game patched with DynRPG you can use this plugin with your game, so that when other people play your game it will render properly, even in full screen.

https://rpgmaker.net/engines/rt2k3/utilities/195/