Jump to content

Recommended Posts

i'm new and just can't understand what is wrong?

Spoiler

[00:02:51]: [string "../mods/marolighter/scripts/prefabs/marolig..."]:109: variable 'onequip' is not declared
LUA ERROR stack traceback:
    =[C]:-1 in (global) error (C) <-1--1>
    scripts/strict.lua:23 in () ? (Lua) <21-26>
    ../mods/marolighter/scripts/prefabs/marolighter.lua:109 in (field) fn (Lua) <49-120>
    scripts/mainfunctions.lua:336 in () ? (Lua) <325-371>
    =[C]:-1 in (method) SpawnPrefab (C) <-1--1>
    scripts/mainfunctions.lua:389 in (global) SpawnPrefab (Lua) <382-391>
    scripts/util.lua:24 in (global) DebugSpawn (Lua) <20-31>
    scripts/consolecommands.lua:483 in (global) c_give (Lua) <475-496>
    c_give("marolighter"):1 in () ? (main) <0-0>
    =[C]:-1 in (global) pcall (C) <-1--1>
    scripts/mainfunctions.lua:2069 in () ? (Lua) <2061-2078>

here's the code and the log, also I'll be glad to receive an advice

master_server_log.txt marolighter.lua marolighterfire.lua

LUA is case sensitive, so technically OnEquip and onequip are too different things to the game. Since you're telling it to look for onequip in your postinit but your actual function is OnEquip it can't find anything and is crashing.

2 minutes ago, Merkyrrie said:

LUA is case sensitive, so technically OnEquip and onequip are too different things to the game. Since you're telling it to look for onequip in your postinit but your actual function is OnEquip it can't find anything and is crashing.

Yea, i thought about that and when i fixed it i got the same crash 

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
×
  • Create New...