Solved Fix this warning

Question that is answered or resolved.

dantedevil

Well-known member
How can fix this warning of the log?
Code:
WARNING: data/chars/bd2/bd2.txt tries to load a no numeric value at offset, where number is expected!
erroneous string: data/chars/bd2/fthrow01b.png
 
Last edited:
Solution
After so much time, I returned to look for the solution of this problem. After briefly checking the animation, I could not believe that the solution was always in front of our eyes, and nobody noticed.

How can you see at the beginning of the line that I mark in red, say "offset" instead of "frame."
There is the error ...
      nodieblink    3
  delay  7
        sound  data/sounds/finhim.wav
  offset  82 177
  frame  data/chars/gang1/bee/rise1.png
  frame  data/chars/gang1/bee/rise2.png
  frame  data/chars/gang1/bee/rise3.png
  delay  319
  offset  84 175
  frame  data/chars/gang1/bee/spain.png
  delay  24
  offset  93 183
  frame  data/chars/gang1/bee/fthrow01b.png
        @cmd    move 3 0 0
  delay  20
 ...
msmalik681 said:
whats the script behind this error ?

I can't see any info about a script,  only say that and in the bottom say :

Code:
Warning: 8 scripts variants are not feed, dumping...
openbor_array
openbor _loadsprite
openbor _loadsprite
openbor _loadsprite
openbor _loadsprite
openbor _loadsprite
openbor _loadsprite
openbor _loadsprite

The game works ok, but I think this warnings are for good reason.
 
the error sounds like you used a string (text) value on a script and it needed a numeric (number) value.  for example spawn a entity with the name 500 then try to use entity name in a script to set hp to 500 the expected input would be 500 as a number but it gets "500" as text and cant work with it.


the second part is easy you need to free all array and sprites when openbor closes.  here is a example script to use in your updated.c


Code:
void oncreate()
	{
	
	//menulist
	setglobalvar("menuList",array(40));
	void a = getglobalvar("menuList");
	set(a,0,"0");
	set(a,1,"Eqiup");
	set(a,2,"Moves_List");
	set(a,3,"Challenges");
	set(a,4,"Go_to_Map");
	set(a,5,"End_Game");


	//images


	setglobalvar("menubg",loadsprite("data/bgs/menu_bg.png"));
	setglobalvar("Kazuya_face",loadsprite("data/scripts/speech/Kazuya_face.png"));
	setglobalvar("Bryan_face",loadsprite("data/scripts/speech/Bryan_face.png"));
	setglobalvar("Asuka_face",loadsprite("data/scripts/speech/Asuka_face.png"));
 }


void ondestroy()
{


    free(getglobalvar("menuList"));
    setglobalvar("menuList", NULL());


    free(getglobalvar("menubg"));
    setglobalvar("menubg", NULL());


    free(getglobalvar("Kazuya_face"));
    setglobalvar("Kazuya_face", NULL());


    free(getglobalvar("Bryan_face"));
    setglobalvar("Bryan_face", NULL());


    free(getglobalvar("Asuka_face"));
    setglobalvar("Asuka_face", NULL());
}
 
That's not a script error. It's an error in your text file "data/chars/bd2/bd2.txt". There's an "offset" command in one of your animations where instead of a number, there's the path to a file "data/chars/bd2/fthrow01b.png". Find that command and fix it to fix the error you're getting.
 
After search in all animations, finally find it.
I can not understand what is wrong with the animation.
But if I delete what is marked in red, the message:
"WARNING: data/chars/gang1/bee/bee.txt tries to load a nonnumeric value at offset, where a number is expected!
erroneus string: data/chars/gang1/bee/fthrow01b.png"  no longer appears in the log.

So how can fix the animation to avoid the message?
anim death47
#MIDAS2
loop 0
  @script
  void vSelf = getlocalvar("self");                //Caller.
  void vEntity;                                    //Target entity placeholder.   
  int  iEntity;                                    //Entity enumeration holder.   
  int  iType;                                      //Entity type.   
  int  iMax      = openborvariant("ent_max");      //Entity count.   
  if(frame==1){                                    //Enumerate and loop through entity collection.     
  for(iEntity=0; iEntity<iMax; iEntity++){           
      vEntity = getentity(iEntity);                    //Get target entity from current loop.
     
      iType  = getentityproperty(vEntity,    "type"); //Get target type.       
                                                        //Enemy type?   
      if (vEntity != vSelf)                                               //Not Self?
   
      if (iType == openborconstant("TYPE_ENEMY")){         
  void iTime = openborvariant("elapsed_time") + getentityproperty(vEntity, "freezetime");         
  changeentityproperty(vEntity, "frozen", 1);         
  changeentityproperty(vEntity, "freezetime", iTime + 7*200);
        }      }    }
  @end_script
        nodieblink    3
delay 7
        sound  data/sounds/finhim.wav
offset 82 177
frame data/chars/gang1/bee/rise1.png
frame data/chars/gang1/bee/rise2.png
frame data/chars/gang1/bee/rise3.png
delay 319
offset 84 175
frame data/chars/gang1/bee/spain.png
delay 24
offset 93 183
frame data/chars/gang1/bee/fthrow01b.png
        @cmd    move 3 0 0
delay 20
offset 93 223
frame data/chars/gang1/bee/fthrow01b.png
        sound  data/sounds/mandie1b.wav
delay 8
#offset 93 223
frame data/chars/gang1/bee/fthrow01b.png
offset 92 223
frame data/chars/gang1/bee/fthrow01b.png
offset 93 223
frame data/chars/gang1/bee/fthrow01b.png
offset 92 223
frame data/chars/gang1/bee/fthrow01b.png
offset 93 223
frame data/chars/gang1/bee/fthrow01b.png
offset 92 223
frame data/chars/gang1/bee/fthrow01b.png
offset 93 223
offset data/chars/gang1/bee/fthrow01b.png
offset 92 223
frame data/chars/gang1/bee/fthrow01b.png
offset 93 223
frame data/chars/gang1/bee/fthrow01b.png
offset 92 223
frame data/chars/gang1/bee/fthrow01b.png
offset 93 223
frame data/chars/gang1/bee/fthrow01b.png
offset 92 223
frame data/chars/gang1/bee/fthrow01b.png
offset 93 223
frame data/chars/gang1/bee/fthrow01b.png
offset 92 223
frame data/chars/gang1/bee/fthrow01b.png
offset 93 223
frame data/chars/gang1/bee/fthrow01b.png
offset 92 223
frame data/chars/gang1/bee/fthrow01b.png

        seta    30
offset 84 175
delay 4
        @cmd    move 16 0 0
@cmd spawn01 "bloody3" 0 80 3
frame data/chars/gang1/bee/f2mid01.png
        @cmd    spawn01 "bloodfl" 0 0 -1
frame data/chars/gang1/bee/f2mid01.png
@cmd spawn01 "bloody3" 10 90 3
        sound  data/sounds/rip.wav
frame data/chars/gang1/bee/f2mid01.png
delay 26
        @cmd    move -2 0 0
frame data/chars/gang1/bee/f2mid01.png
        seta    0
delay 7
offset 82 177
        @cmd    leaper -0.1 0.2 0
frame data/chars/gang1/bee/f2mid02.png
frame data/chars/gang1/bee/f2mid03.png
frame data/chars/gang1/bee/f2mid04.png
delay  1
        sound  data/sounds/fall1.wav
frame data/chars/gang1/bee/f2mid05.png
delay 132
frame data/chars/gang1/bee/f2mid05.png
delay 1
        subentity fat
        spawnframe 32 264 210 0 1
frame data/chars/gang1/bee/f2mid05.png
frame data/chars/gang1/bee/f2mid05.png
delay 20
frame data/chars/gang1/bee/f2mid05.png
 
Dante, which tool do you use to code? I had an issue like that back on the past and I discovered that there was a special (invisible) character in my text file, because I use 3 different OS to code the game (Windows, Mac and Android).

If you open the file in notepad or OpenBORStats (which loves doing this type of stuff), you won't see it. But try to use Notepad++ and you will be able to see it.
 
Got to VIEW > SWHO SYMBOL > SHOW ALL CHARACTERS
you should see this:
image.png

If you see other chracters, try deleting them.

I use this tool to for coding too, since it has colored synthax for a lot of languages, including C
 
I continue to research about this and I have not been able to find a solution. The animation does not seem to have anything strange, I really can not figure out how to correct this error.
 
Brute force trial and error. I'd take out all those offsets and see if anything changes - then re add them a few at a time until it comes back.

DC
 
After so much time, I returned to look for the solution of this problem. After briefly checking the animation, I could not believe that the solution was always in front of our eyes, and nobody noticed.

How can you see at the beginning of the line that I mark in red, say "offset" instead of "frame."
There is the error ...
      nodieblink    3
  delay  7
        sound  data/sounds/finhim.wav
  offset  82 177
  frame  data/chars/gang1/bee/rise1.png
  frame  data/chars/gang1/bee/rise2.png
  frame  data/chars/gang1/bee/rise3.png
  delay  319
  offset  84 175
  frame  data/chars/gang1/bee/spain.png
  delay  24
  offset  93 183
  frame  data/chars/gang1/bee/fthrow01b.png
        @cmd    move 3 0 0
  delay  20
  offset  93 223
  frame  data/chars/gang1/bee/fthrow01b.png
        sound  data/sounds/mandie1b.wav
  delay  8
  #offset  93 223
  frame  data/chars/gang1/bee/fthrow01b.png
  offset  92 223
  frame  data/chars/gang1/bee/fthrow01b.png
  offset  93 223
  frame  data/chars/gang1/bee/fthrow01b.png
  offset  92 223
  frame  data/chars/gang1/bee/fthrow01b.png
  offset  93 223
  frame  data/chars/gang1/bee/fthrow01b.png
  offset  92 223
  frame  data/chars/gang1/bee/fthrow01b.png
  offset  93 223
  offset  data/chars/gang1/bee/fthrow01b.png
  offset  92 223
  frame  data/chars/gang1/bee/fthrow01b.png
  offset  93 223
  frame  data/chars/gang1/bee/fthrow01b.png
  offset  92 223
  frame  data/chars/gang1/bee/fthrow01b.png
  offset  93 223
  frame  data/chars/gang1/bee/fthrow01b.png
  offset  92 223
  frame  data/chars/gang1/bee/fthrow01b.png
  offset  93 223
  frame  data/chars/gang1/bee/fthrow01b.png
  offset  92 223
  frame  data/chars/gang1/bee/fthrow01b.png
  offset  93 223
  frame  data/chars/gang1/bee/fthrow01b.png
  offset  92 223
  frame  data/chars/gang1/bee/fthrow01b.png
        seta    30
So in the end, the solution was simpler than it seemed.
It is really hard to believe nobody noticed.  ;D
 
Solution
Back
Top Bottom