Jump to content

Photo

error after compilation


  • Please log in to reply
5 replies to this topic

#1 nyrox

nyrox

    Junior

  • Members
  • Location:Québec

Posted 05 September 2022 - 08:52 PM

2.53
I’ve never had that before.
after a successful compilation if I have this error.
 
Unable to parse instrution 3061 from script Zirconia.qst
the error was parameter 2 invalid! the command was (SETR) d2.gd256)
 
unable to parse instruction 24399 from script Zirconia.qst
the error was parameter 1 invalid! the command was (SETR) d2.gd256)
 
after a start the game i have this repete in the debug console
 
Invalid pointer (0) passed to array (don't change the values of your array pointers)
Global script 2 (globalScript):
what i can do for that ???

Edited by nyrox, 05 September 2022 - 08:57 PM.


#2 Emily

Emily

    Scripter / Dev

  • ZC Developers

Posted 05 September 2022 - 09:18 PM

your script has too many global variables, more than is allowed in 2.53



#3 nyrox

nyrox

    Junior

  • Members
  • Location:Québec

Posted 05 September 2022 - 09:37 PM

ok thanks



#4 nyrox

nyrox

    Junior

  • Members
  • Location:Québec

Posted 06 September 2022 - 08:20 PM

i make a lot of global variale like this

 

int Tzone01[] = "Zirconia Coastline";
int Tzone02[] = "Zirconia Village";
int Tzone03[] = "Castle Courtyard";
int Tzone04[] = "Defense Cavern";
int Tzone04a[] = "Defense Cavern 1F";
int Tzone04b[] = "Defense Cavern P";
 
for use string in this
 
int  ListZone[] =    {   Tzone00,   Tzone01,   Tzone04,   Tzone09,   Tzone06,   Tzone05,    Tzone25,    Tzone41,   Tzone02,   Tzone07}
 
to use with  this:
 
Screen->DrawString(4, x, y, FONT_Z3, color, backcolor, TF_NORMAL, ListZone[i], OP_OPAQUE);
 
for draw name of dmap on screen.
 
i found this fonction:   void GetDMapName(int DMap, int buffer[]);
 
maybe with that fonction a save a lot of global variable
 
but i don't know how to use it for do the same thing.
 
or if you have a better idea.


#5 Alucard648

Alucard648

    Wizard

  • Members
  • Location:castle Dracula

Posted 07 September 2022 - 03:40 AM

1. Decrlare buffer, which is an array (21 ints long), at the start of your global script.

2. When you enter new Dmap, use  GetDMapName function to load name of the newly entered DMap into buffer from step 1.

3. When needed to render DMap name, use the loaded buffer from step 2 as string argument passed to Screen->DrawString function. 


  • Aquamentus (Facing Right) likes this

#6 nyrox

nyrox

    Junior

  • Members
  • Location:Québec

Posted 09 September 2022 - 06:13 PM

2. When you enter new Dmap, use  GetDMapName function to load name of the newly entered DMap into buffer from step 1.

 

you can't just take the name of the Dmap you are in game?

 

in the fonction   void GetDMapName(int DMap, int buffer[]);

what the "int Dmap" argument for? 

 

in short what i want is array with inside a list off string.

 

the only way i found is 

 

made global variable like

int Tzone01[] = "Zirconia Coastline";
int Tzone02[] = "Zirconia Village";
int Tzone03[] = "Castle Courtyard";
 
and put in the array
 

int  ListZone[] =    {   Tzone00,   Tzone01,   Tzone04,   Tzone09,   Tzone06,   Tzone05,    Tzone25,    Tzone41,   Tzone02,   Tzone07}

 

in first i try to change  some off the Tzone by GetDMapName( 3, buffer[]);

like 

int  ListZone[] =    {   Tzone00,   , Game->GetDMapName( 3, buffer),   Tzone04,   Tzone09,   Tzone06, ... }

 

but this get founction don't return nothing like Game->GetComboData(13,0x6E,94) for exemple  

 

maybe you known a better way  becaue this take a lot of global 

 

the string variable is very special to use and a never found a metod to change or concat sting like in C++ in the the ZC script.

 

it was very easy if i can just declared something like this

 

int  ListZone[] = {  "Zirconia Coastline""Zirconia Village" "Castle Courtyard" };

 

but this don't work

 

 


Edited by nyrox, 09 September 2022 - 06:17 PM.



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users