Tejras3 Posted February 4, 2023 Share Posted February 4, 2023 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 Link to comment https://forums.kleientertainment.com/forums/topic/145926-im-trying-to-make-a-simple-lighter-but-the-server-keeps-crashing-when-i-spawn-it/ Share on other sites More sharing options...
Merkyrrie Posted February 4, 2023 Share Posted February 4, 2023 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. Link to comment https://forums.kleientertainment.com/forums/topic/145926-im-trying-to-make-a-simple-lighter-but-the-server-keeps-crashing-when-i-spawn-it/#findComment-1620118 Share on other sites More sharing options...
Tejras3 Posted February 4, 2023 Author Share Posted February 4, 2023 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 Link to comment https://forums.kleientertainment.com/forums/topic/145926-im-trying-to-make-a-simple-lighter-but-the-server-keeps-crashing-when-i-spawn-it/#findComment-1620119 Share on other sites More sharing options...
Tejras3 Posted February 4, 2023 Author Share Posted February 4, 2023 I'm stupid. I just realized that i was fixing it in the wrong (copied) folder and not in the mods one Thank you for the help tho Link to comment https://forums.kleientertainment.com/forums/topic/145926-im-trying-to-make-a-simple-lighter-but-the-server-keeps-crashing-when-i-spawn-it/#findComment-1620120 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now