Blockland Forums > Modification Help
Datablock syntax error for add-on. Can't find issue.
(1/1)
xS K I D z:
This is the error the console gives me when I start a server with just this Add-On enabled (cleaned up weird spacing issues with copy/paste from console for easier reading):

--- Code: ---Loading Add-On: Item_RedBalloon (CRC:1308927574)
Add-Ons/Item_RedBalloon/Item_RedBalloon.cs Line: 174 - Syntax error.
>>> Some error context, with ## on sides of error halt:
^stateTransitionOnTimeout[0]^= "FloatIdle";
^stateTimeoutValue[0]^^= 0.01;
^stateAllowImageChange[0]^= false;
^stateWaitForTimeout[0]^^= true;

^stateName[1]^^^= "FloatIdle";
^stateSequence[1]^^= "FloatIdle";
^stateAllowImageChange[1]^= true;
}

function ##b##alloonImageEquip::onMount(%this, %obj, %slot)
    {
        ^Parent::onMount(%this, %obj, %slot);
        ^%obj.hideNode("RHand");
        ^%obj.hideNode("RHook");

        //%this.schedule(100, lowerGrav, %obj);
    }

//function balloonImageEquip::lowerGrav(%this,%obj,%slot)
//    {
//        for(%i=0; %i<1; %i)
>>> Error report complete.

ADD-ON "Item_RedBalloon" CONTAINS SYNTAX ERRORS
--- End code ---
Dunno what all the '^' are for but I left most of them in as they're only in console.

It's taking me way too long to make this simple Add-On but I simply don't see the error here and have tried to fix it.
Btw I'm also making a version where your "player gravity" is lower (like the balloon(s) are keeping you from falling/jumping too fast) so that's why there is some script for that which I'm still learning how to do properly with the getVelocity and stuff, which I'll gladly take some advice on as that's not going too well either lol.

Just wanna make my version of a balloon for/because of this: https://forum.blockland.us/index.php?topic=313464.0
PhantOS:
you forgot a ; after your datablock, right after the states. if i were you i'd actually learn the torquescript syntax before attempting to make something so heavily based around torquescript syntax
xS K I D z:

--- Quote from: PhantOS on September 25, 2017, 04:38:09 PM ---you forgot a ; after your datablock, right after the states. if i were you i'd actually learn the torquescript syntax before attempting to make something so heavily based around torquescript syntax

--- End quote ---
So it seems, haha! Didn't even notice, must've copy/pasted a function or something and used it as a datablock and missed the ';', so then after copy/pasting that it sort of spread and meshed together. How embarassing ;)

Honestly I can't remember making that mistake before, so now if it happens again I'll look for that.


--- Quote ---if i were you i'd actually learn the torquescript syntax before attempting to make something so heavily based around torquescript syntax
--- End quote ---
That's why this thread exists, doesn't it? To learn or to teach. I'm still learning, and I learn by doing. And I only came here after trying it-it didn't work, trying it-didn't work, and trying it again-still didn't work. So I asked :P Thanks for the help though, you've helped me quite a bit from your responses tbh
phflack:
note that the error is normally before the ##s
Navigation
Message Index

Go to full version