The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CathTool / Omnitool scripting error
aBadScripter Offline
Junior Member

Posts: 4
Threads: 1
Joined: Oct 2015
Reputation: 0
#1
CathTool / Omnitool scripting error

Hello, I'm new to the forums, I apologize if this is the wrong section to post my question in. ^_^"

I'm relatively new to the, I guess scripting community, and am having some trouble with a little test map I'm doing. I'm trying to make an omnitool open a locked door. I haven't been able to figure out the problem, but I keep getting the same error in the script which says:

"FATAL ERROR: Could not load script file 'maps/test_01.hps'!
test_01.hps (190, 5): ERR: No smatching signatures to
'CathTool_UseOnPanel(tString, tString)'

I had followed the developer test on the Steam workshop to try and get a feel for what I need to do, except I used my own names for everything. Well, I always got that script error above. Eventually I got frustrated, and had changed everything in the test map to the exact same things in the developer test, and even following the script word for word, and I still get the same script error above. When I was looking in the developer test script looking for anything based on the CathTool script, I only found one line of script for the CathTool which was the following:

CathTool_UseOnPanel("omnitool","omnipanel_finaldoor");

if I do this: //CathTool_UseOnPanel("omnitool","omnipanel_finaldoor"); then I can open the map, but none of the GUI will load on the omnitool or the omnipanel. Instead, I get a ton of errors in the lower left hand corner as you can see in the pictures I will include. I don't know how to fix these errors, and its really frustrating. I'm probably overlooking something simple, or maybe it really is just difficult...

The code I used to open the door is the following:

/////////////////////////////////////////
// Event *Player uses omnitool to open final door*
//{//////////////////////////////////////


//-------------------------------------------------------
bool mbFinalDoorOpened = false;
//-------------------------------------------------------

bool omnitool_OnPickUp(const tString &in asTool)
{
return true;
}

//-------------------------------------------------------

bool omnitool_CanBeUsed(const tString &in asTool, const tString &in asEntity)
{
if (asEntity == "omnipanel_finaldoor" && mbFinalDoorOpened == false) return true;

return false;
}

//-------------------------------------------------------

bool omnitool_OnUse(const tString &in asTool, const tString &in asEntity)
{
if (asEntity == "omnipanel_finaldoor")
{
cLux_AddDebugMessage("Use omnitool");
CathTool_UseOnPanel("omnitool","omnipanel_finaldoor");
mbFinalDoorOpened = true;
}
return false;
}

As I said... This is the exact copy from the developer test because I was frustrated and thought that this code would work, unfortunately, it didn't work for me.

Now onto the map itself...

The omnitool is named "omnitool", and under the "Entity" tab and under the "Tool" tab, I have it set to "omnitool_OnPickUp" under PickupCallback, "omnitool_OnUse", under UseCallback, "omnitool_CanBeUsed" under CanBeUsedCallback.

The omnipanel name is "omnipanel_finaldoor", and under the "Entity" tab under the "Connections" tab, the ConnectedEntity is "finaldoor".

There is a script area, or rather a tool area named "ToolArea_1", and under the "Area" tab under the "Tool" tab, the ToolsToEquip is the "omnitool".

The door is named "finaldoor".


The pictures included show that there is no GUI on the the omnitool or the omnipanel along with a bunch of errors that I have no idea how to fix.

Can anyone please help me fix this issue and explain what I've been doing wrong? Undecided


Attached Files
.jpg   2015-10-29_00003.jpg (Size: 72.94 KB / Downloads: 164)
.jpg   2015-10-29_00004.jpg (Size: 130.51 KB / Downloads: 157)
.jpg   2015-10-29_00005.jpg (Size: 106.47 KB / Downloads: 152)
10-29-2015, 11:00 PM
Find


Messages In This Thread
CathTool / Omnitool scripting error - by aBadScripter - 10-29-2015, 11:00 PM



Users browsing this thread: 1 Guest(s)