- Code: Select all
typedef struct ActorNode{
Actor * ThisActor;
ActorNode * NextActor;
}ActorNode;
Line 3: Expected {
Line 4: Expected ;
Also, there is no NULL? So what defines a Null pointer?
typedef struct ActorNode{
Actor * ThisActor;
ActorNode * NextActor;
}ActorNode;
typedef struct ActorNode{
Actor * ThisActor;
struct ActorNode * NextActor;
}ActorNode;
ActorNode * parentActor;
parentActor = NULL;
typedef struct ActorNode{
Actor* ThisActor;
struct ActorNode* NextActor;
}ActorNode;
ActorNode* currentActor, parentActor;
int i;
parentActor = NULL;
//In this case the list is initialize in reverse order child then parent.
void initializeLinkedList()
{
for(i=1;i<=10;i++) {
//Allocate space for the new actor node
currentActor = (ActorNode *)malloc(sizeof(ActorNode));
//Create the new actor and have the actor node point to it.
//CreateActor() returns a pointer to the actor.
currentActor->ThisActor = CreateActor("myNewActor", "icon", "(none)", "(none)", 0, 0, false);
//Sets the last Actor node to be the parent of the Current Node
currentActor->NextActor = parentActor;
//Sets the Current Node as the current parent for the next node
parentActor = currentActor;
}
}
typedef struct ActorNode{
Actor* ThisActor;
struct ActorNode* NextActor;
}ActorNode;
ActorNode* currentActor;
int i;
//Have to initiate as null on declaration
ActorNode* parentActor = NULL;
//In this case the list is initialize in reverse order child then parent.
void initializeLinkedList()
{
for(i=1;i<=10;i++) {
//Allocate space for the new actor node
currentActor = (ActorNode *)malloc(sizeof(ActorNode));
//Create the new actor and have the actor node point to it.
//CreateActor() returns a pointer to the actor.
currentActor->ThisActor = CreateActor("myNewActor", "icon", "(none)", "(none)", 0, 0, false);
//Sets the last Actor node to be the parent of the Current Node
currentActor->NextActor = parentActor;
//Sets the Current Node as the current parent for the next node
parentActor = currentActor;
}
}
ActorNode *currentActor, *parentActor;
parentActor = NULL
skydereign wrote:The second problem is a bug in gE. I think you can read about it here.
http://game-editor.com/forum/viewtopic.php?f=2&t=10615&p=75404#p75404
If I recall correctly, gE needs the getclone call to know to update the actors. It is very similar to the global code problem, which is probably related.
//MyTextActor
ShowMessage("Hello World");
Game A Gogo wrote:skydereign wrote:The second problem is a bug in gE. I think you can read about it here.
http://game-editor.com/forum/viewtopic.php?f=2&t=10615&p=75404#p75404
If I recall correctly, gE needs the getclone call to know to update the actors. It is very similar to the global code problem, which is probably related.
I'm wondering if this is related to the fact that you can't change an actor's text through a global function without commenting it's name somewhere in the script...
- Code: Select all
//MyTextActor
ShowMessage("Hello World");
ShowMessage setting a string to MyTextActor... it wouldn't work without the //MyTextActor
Perhaps the same is happening for color setting and all?
If not, please ignore me!
void UpdateTextv1(char buffer[30])
{
strcpy(myText.text, buffer);
}
void UpdateTextv2(char buffer[30])
{
Actor* myActor;
myActor = getclone("myText.0");
strcpy(myActor->text, buffer);
}
EvanBlack wrote:Or maybe just a call outside of the text actor itself?
Users browsing this forum: No registered users and 1 guest