ExecuteScript
2 posters
Page 1 of 1
Re: ExecuteScript
When you add an 'Execute' to an existing script, it goes above the script under void main() ?
Drgnwlkr- Seasoned Explorer
- Number of posts : 180
Age : 59
Main Character : Elladyr the Pathfinder
Other Character : Arauka'dae the Ghost
Other Character. : Adahi Ditlihi, Knight of Dalix
Other Character.. : Aradia the Warblade
Registration date : 2011-04-30
Re: ExecuteScript
You put the ExecuteScript command within the main script. For example, take this script being called within a conversation:
- Code:
void main()
{
object oPC = GetPCSpeaker(); // This defines oPC as the player character the NPC is speaking with.
object oNPC = OBJECT_SELF; // We'll have this called from the NPC's conversation.
SpeakString("I am running some sort of script! Ha!"); // The NPC says something dumb.
ExecuteScript("metoo", oPC); // player character runs the script called "metoo"
SpeakString("You just had to interrupt me, didn't you?"); // The NPC says something else dumb, after the PC runs the "metoo" script.
}
ExecuteScript
Ah, thank you Amethyst Dragon. That helps alot =)
Drgnwlkr- Seasoned Explorer
- Number of posts : 180
Age : 59
Main Character : Elladyr the Pathfinder
Other Character : Arauka'dae the Ghost
Other Character. : Adahi Ditlihi, Knight of Dalix
Other Character.. : Aradia the Warblade
Registration date : 2011-04-30
Re: ExecuteScript
Okay, I was adding some 'include' script to OnClientEnter and got the error:
'x3_mod_def_enter' did not compile.
aps_include.nss: ERROR: DUPLICATE FUNCTION IMPLEMENTATION (VectorToString)
Anyone have any clues? The original script just add the horse menus to the PC and what I was adding...
#include "ldh_pers_hsng"
#include "aps_include"
void main()
{
ldh_OnUnAcquireItem();
...was meant to be part of a housing system I thought about using.
'x3_mod_def_enter' did not compile.
aps_include.nss: ERROR: DUPLICATE FUNCTION IMPLEMENTATION (VectorToString)
Anyone have any clues? The original script just add the horse menus to the PC and what I was adding...
#include "ldh_pers_hsng"
#include "aps_include"
void main()
{
ldh_OnUnAcquireItem();
...was meant to be part of a housing system I thought about using.
Drgnwlkr- Seasoned Explorer
- Number of posts : 180
Age : 59
Main Character : Elladyr the Pathfinder
Other Character : Arauka'dae the Ghost
Other Character. : Adahi Ditlihi, Knight of Dalix
Other Character.. : Aradia the Warblade
Registration date : 2011-04-30
Re: ExecuteScript
ERROR: DUPLICATE FUNCTION IMPLEMENTATION (VectorToString)
This means that the VectorToString() function is defined in more than one place for your script. Probably in more than one of the "includes" you are using. For a script to compile properly (or at all), no function can be a duplicate of another (at least in name) in the same script (and all includes are considered part of the script you are, um, including them in).
This means that the VectorToString() function is defined in more than one place for your script. Probably in more than one of the "includes" you are using. For a script to compile properly (or at all), no function can be a duplicate of another (at least in name) in the same script (and all includes are considered part of the script you are, um, including them in).
Re: ExecuteScript
Since the error named aps_include.nss, would that be one of the duplicates?
Drgnwlkr- Seasoned Explorer
- Number of posts : 180
Age : 59
Main Character : Elladyr the Pathfinder
Other Character : Arauka'dae the Ghost
Other Character. : Adahi Ditlihi, Knight of Dalix
Other Character.. : Aradia the Warblade
Registration date : 2011-04-30
Re: ExecuteScript
Probably.Drgnwlkr wrote:Since the error named aps_include.nss, would that be one of the duplicates?
Re: ExecuteScript
I've looked through the whole script and there is only 1 aps_include in the script where the error occurred.
Now I have an 'unknown state in compiler' error in another script t\about climate/weather but I did not alter anything around this error and what I did alter was written exactly the way others parts of those 'areas'...meaning when I created a 'mild climate' it was written exactly like the pre-existing 'moderate climate' with just the variable %s changed.
Now I have an 'unknown state in compiler' error in another script t\about climate/weather but I did not alter anything around this error and what I did alter was written exactly the way others parts of those 'areas'...meaning when I created a 'mild climate' it was written exactly like the pre-existing 'moderate climate' with just the variable %s changed.
Drgnwlkr- Seasoned Explorer
- Number of posts : 180
Age : 59
Main Character : Elladyr the Pathfinder
Other Character : Arauka'dae the Ghost
Other Character. : Adahi Ditlihi, Knight of Dalix
Other Character.. : Aradia the Warblade
Registration date : 2011-04-30
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum