Jump to content

LUA: Failed to call?


Recommended Posts

Hello dear community, I've bought one hell of a buggy script.

It keeps giving me an error in the logs saying that it cannot Call something from my script

(I cannot give you any of this code due' to the copyrights on the bought script)

But i can show you the errors, and hopefully you might be able to atleast tell me what the problem could be.

(I prefer doing stuff myself also :-) )

First Error's:

[2011-05-03 15:36:00] ERROR: ? call: failed to call 'item-system:loadItems' 
[2011-05-03 19:00:42] ERROR: lottery\s_lottery_system.lua:81: call: failed to call 'item-system:deleteAll' 
[2011-05-03 15:32:39] ERROR: ? call: failed to call 'item-system:loadItems' 
[2011-05-03 15:36:50] ERROR: global\item_globals.lua:6: call: failed to call 'item-system:hasItem' 

As you've might have noticed it's my inventory system that totally freaks out when an player connects.

Ohh yea also this one error:

[2011-05-03 16:00:42] WARNING: faction-system\s_faction_system.lua:1071: Bad argument @ 'getElementData' 
[2011-05-03 16:00:42] ERROR: faction-system\s_faction_system.lua:906: attempt to perform arithmetic on local 'bankmoney' (a boolean value) 

I hope that you guys will help me out, I'm new at LUA Scripting and would love to atleast know how to fix these errors (It would give me an great boost within' LUA)

Link to comment
Hello dear community, I've bought one hell of a buggy script.

It keeps giving me an error in the logs saying that it cannot Call something from my script

(I cannot give you any of this code due' to the copyrights on the bought script)

But i can show you the errors, and hopefully you might be able to atleast tell me what the problem could be.

(I prefer doing stuff myself also :-) )

First Error's:

[2011-05-03 15:36:00] ERROR: ? call: failed to call 'item-system:loadItems' 
[2011-05-03 19:00:42] ERROR: lottery\s_lottery_system.lua:81: call: failed to call 'item-system:deleteAll' 
[2011-05-03 15:32:39] ERROR: ? call: failed to call 'item-system:loadItems' 
[2011-05-03 15:36:50] ERROR: global\item_globals.lua:6: call: failed to call 'item-system:hasItem' 

As you've might have noticed it's my inventory system that totally freaks out when an player connects.

Ohh yea also this one error:

[2011-05-03 16:00:42] WARNING: faction-system\s_faction_system.lua:1071: Bad argument @ 'getElementData' 
[2011-05-03 16:00:42] ERROR: faction-system\s_faction_system.lua:906: attempt to perform arithmetic on local 'bankmoney' (a boolean value) 

I hope that you guys will help me out, I'm new at LUA Scripting and would love to atleast know how to fix these errors (It would give me an great boost within' LUA)

show your script

Link to comment

Not allowed to due' to copyrights.

I cannot show one single piece of the code due' to those stupid copyrights + Its an 100k+ Lines script.

I just found out.

When someone tries to connect it gives an failure of something that might want to be Serversided instead of Client?

[2011-05-05 11:23:40] JOIN: Angelo joined the game (IP: XX.XXX.XX.XX) 
[2011-05-05 11:23:49] ERROR: Client triggered serverside event itemResourceStarted, but event is not added serverside 

Am I correct.?

Link to comment
Not allowed to due' to copyrights.

I cannot show one single piece of the code due' to those stupid copyrights + Its an 100k+ Lines script.

I just found out.

When someone tries to connect it gives an failure of something that might want to be Serversided instead of Client?

[2011-05-05 11:23:40] JOIN: Angelo joined the game (IP: XX.XXX.XX.XX) 
[2011-05-05 11:23:49] ERROR: Client triggered serverside event itemResourceStarted, but event is not added serverside 

Am I correct.?

OMG show me error lines / functions/events ....

Link to comment

Just had permission by the seller :-)

function hasSpaceForItem( element ) 
    return call( getResourceFromName( "item-system" ), "hasSpaceForItem", element ) 
end 
  
function hasItem( element, itemID, itemValue ) 
    return call( getResourceFromName( "item-system" ), "hasItem", element, itemID, itemValue ) 
end 
  
function giveItem( element, itemID, itemValue ) 
    return call( getResourceFromName( "item-system" ), "giveItem", element, itemID, itemValue ) 
end 
  
function takeItem( element, itemID, itemValue ) 
    return call( getResourceFromName( "item-system" ), "takeItem", element, itemID, itemValue ) 
end 
  

The following codes gives these errors:

[2011-05-05 11:33:56] ERROR: attempt to call a nil value 
[2011-05-05 11:33:56] ERROR: global\item_globals.lua:6: call: failed to call 'item-system:hasItem' 

Any idea?

Link to comment

Meta for Globals folder:

<script src="item_globals.lua" type="server"/> 
    <export function="hasSpaceForItem" type="server"/> 
    <export function="hasItem" type="server"/> 
    <export function="giveItem" type="server"/> 
    <export function="takeItem" type="server"/> 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...