I'm really stuck ![]()
When I import my scripts in a new quest file, it works all fine, but when I import them in my actual quest (one I've been working one a long time) the enemy doesn't move. I got this error every frame in allegro.log:
Global script 2 (Active): Invalid pointer (0) passed to array (don't change the values of your array pointers)
Does any of you know what this means? I'm not even passing anything to an array in the global script directly. Here is my global script:
import "std.zh"
import "ffcscript.zh"
import "string.zh"
import "ghost.zh"
import "NTCCscripts/enemy.z"
global script Active {
void run(){
StartGhostZH();
while(true)
{
UpdateGhostZH1();
BombsScreenShake();
Waitdraw();
UpdateGhostZH2();
Waitframe();
}
}
}
And my enemy script, which works perfectly in another quest file, very same scripts:
ffc script Rebonite{
void run(int enemyId){
// Initialize
npc ghost = Ghost_InitAutoGhost(this, enemyId);
//Update loop
while(true)
{
Ghost_MoveTowardLink(4, 3);
Ghost_Waitframe(this, ghost, true, true);
}
}
}
It seems to me this is an outside cause, that has little to do with the scripts I wrote. I think all libraries are fine too (like ghost.zh or std.zh) as they work perfect in another file.
So does anyone have a clue what could cause this, a quest related setting or such? I checked the rules already, they don't seem to be the cause.
Edit: When searching thoroughly through this thread, I found that this has to do with testing on a saved file in ZC (not Zquest). Oh well, problem fixed I suppose.
Edited by Twilight_Knight, 13 April 2016 - 12:17 PM.

