A command makes OpenBor shut down

16-bit Fighter

Active member
When I use the command Slamstart by the script player.c, I have no problem. But when I use this command by the script grabscript_complete.c, OB shuts down. OpenBorLog indicates that there's an exception but I don't understand what it means.
Thanks by advance!
 
That error message usually means one of the functions isn't working properly. One of the reason is because it tried to modify an entity which doesn't exist.

Rather than stabbing in the dark, why don't you read log file again and find the real error message somewhere above that message.

We might need to see Slamstart function from grabscript_complete.c also to understand what's wrong.
 
Thanks Bloodbane, you're right, I'll be able to read better the Log next time. I didn't notice the two commands Slamstart were different (there is no notes about a change). Since now I changed one command with the another one, it works.

Here is the error message.

Code:
Wrong drop value.
Script function 'damageentity' returned an exception, check the manual for details.
 parameters: #119088952, #141285568, 0, <VT_EMPTY>   Unitialized, 11,  
 
********** An Error Occurred **********
*            Shutting Down            *

There's an exception while executing script 'Haggard' data/chars/haggard/haggard.txtTotal Ram: 4294139904 Bytes
 Free Ram: 1690693632 Bytes
 Used Ram: 50593792 Bytes

I guess the problem was there is an integer (iDrop) in grabscript_complete's Slamstart and this was needed to affect damageentity.

Code:
void slamstart() // (Slam Starter for Cody/Guy grabbackward)
{ // Slam Starter for nongrab slams
// Use finish or throw after using this
   void self = getlocalvar("self");
   void target = getlocalvar("Target" + self);

   if(target==NULL())
   {
     target = getentityproperty(self, "opponent");
     setlocalvar("Target" + self, target);
   }
   if(target!=NULL())
   {
     damageentity(target, self, 0, 1, openborconstant("ATK_NORMAL4")); // Slam Starter
   }
}

Code:
void slamstart (int iDrop)
{ // Slam Starter
// Use finish after using this
   void self = getlocalvar("self");
   void target = getlocalvar("Target" + self);

   if(target==NULL())
   {
     target = getentityproperty(self, "grabbing");
     setlocalvar("Target" + self, target);
   }
   if(target!=NULL())
   {
     damageentity(target, self, 0, iDrop, openborconstant("ATK_NORMAL7")); // Slam Starter
   }
}
 
Back
Top Bottom