Author Topic: missing something in the script  (Read 2244 times)

I wrote this the script for footprint.

server.cs

function serverCmdDFPrint(%player)

datablock PlayerData(defaultfootprintParticle){}

{
    diffuseMap[0] = "footprint";
    vertColor[0] = true;
    translucent = true;
    castShadows = "0";
    translucentZWrite = "1";
    materialTag0 = "Player";
    decalOffset = "1";
   dustEmitter = "1";
   footPuffEmitter = "1";
   footPuffNumParts = "1";
   footPuffRadius = "5.0";
};



SYNTAX ERRORS
Quote
Loading Add-On: Script_DefaultFootPrint (CRC:-689012768)
Add-Ons/Script_DefaultFootPrint/server.cs Line: 3 - Syntax error.
>>> Some error context, with ## on sides of error halt:
unction serverCmdDFPrint(%player)



datablock ##P##layerData(defaultfootprintParticle){}

{
    diffuseMap[0] = "footprint";
    vertColor[0] = true;
    translucent = true;
    castShadows = "0";
    translucentZWrite = "1";
    materialTag0 = "Player";
    decalOffset = "1";
    ^dustEmitter = "1";

>>> Error report complete.

ADD-ON "Script_DefaultFootPrint" CONTAINS SYNTAX ERRORS

I tired fix it, but it keep say syntax errors.
« Last Edit: November 01, 2014, 09:55:29 PM by Furling² »

remove the {}

before
Code: [Select]
datablock PlayerData(defaultfootprintParticle){}

{

after
Code: [Select]
datablock PlayerData(defaultfootprintParticle) {
edit: I think the above function serverCmdDFPrint(%player) also needs to be opened with { and closed but I could be mistaken
« Last Edit: November 01, 2014, 10:36:03 PM by alex dude »


fix it and other issue error

Loading Add-On: Script_DefaultFootPrint (CRC:570692213)
Add-Ons/Script_DefaultFootPrint/server.cs Line: 6 - Syntax error.
>>> Some error context, with ## on sides of error halt:
unction serverCmdDFPrint(%player) {



datablock PlayerData(defaultfootprintParticle) {





}##
##
    diffuseMap[0] = "footprint";

    vertColor[0] = true;

    translucent = true;

    castShadows = "0";

    translucentZWrite = "1";

    materialTag0 = "Player";

    decalOffset = "1";

^dustEmitter = "1";

^footPuffEmitter = "1";

^footPuffNumParts = "1";
>>> Error report complete.

ADD-ON "Script_DefaultFootPrint" CONTAINS SYNTAX ERRORS

1. You can't define a datablock inside a function like that
2. You didn't put the datablock properties inside the datablock brackets

from the looks of that error, it seems you have placed the properties of this datablock outside of the curly braces {} < these
making a function? start and end it with curly braces, like this:
Code: [Select]
function harold(%this) {
   echo("you called me!");
} //END WITH CURLY BRACES

Edit:
Your footprint particle datablock:
Code: [Select]
datablock PlayerData(defaultfootprintParticle){
    diffuseMap[0] = "footprint";
    vertColor[0] = true;
    translucent = true;
    castShadows = "0";
    translucentZWrite = "1";
    materialTag0 = "Player";
    decalOffset = "1";
    dustEmitter = "1";
    footPuffEmitter = "1";
    footPuffNumParts = "1";
    footPuffRadius = "5.0";
};

Your function to call it (doing /dfprint)
Code: [Select]
function serverCmdDFPrint(%player) {
   //do you want to assign this to the player here?
}

I can't seem to find the footprint add-on to see what you are trying to do, if you could link it here it would be easier.

« Last Edit: November 02, 2014, 01:50:45 AM by alex dude »

I can't seem to find the footprint add-on to see what you are trying to do, if you could link it here it would be easier.
http://www-rohan.sdsu.edu/~stewart/GPGT/Appendix%20A%20-%20Quick%20References.pdf
page 105 (Footprints and -puffs) line script. How I discovered this? I was use torque engine open source, I saw the player walking as foot print behind trails.

original script: Material.cs
new Material(CommonPlayerFootprint)
{
   diffuseMap[0] = "footprint";
   vertColor[0] = true;
   translucent = true;
   castShadows = "0";
   translucentZWrite = "1";
   materialTag0 = "Player";
};

Download link of open source https://github.com/GarageGames/Torque3D/archive/development.zip
you have set it up to install it then you will find the path folder ( Torque3D-3-6-1-FullTemplate>art>shapes>actors>common) If you want test player walking around with the footprint, you have run Torque 3D.exe

I have tested your script has error of the close line of };
« Last Edit: November 02, 2014, 01:35:23 AM by Furling² »

This is not Torque 3D. While yes, TGE had footsteps, they only work on terrain and interiors as far as I can tell, and require the DecalData system that Badspot removed.

new Material(CommonPlayerFootprint)
This is not Torque 3D.
This
"Material" is not a valid class in the version of Torque that Blockland uses

This
"Material" is not a valid class in the version of Torque that Blockland uses
okay what are you suggest fix the script lines?

This Torque version does not have the required features for this to work and as Port said:
DecalData system that Badspot removed.