ChubbyBacon Posted August 26, 2024 Share Posted August 26, 2024 The error reads .../modmain.lua"]:150 (the last line in modmain): 'end' expected (to close 'if' at line 43) near <eof>. However, the code has enough ends..? Before, I encountered this problem in my character prefab, and as a test, I added extra ends to the wrong code, which fixed it (though probably causing other problems?). This crashes the game immediately in modmain. Here's the code at line 43: ------------------------------------------------------------------------------------ if owner.compnents.skilltreeupdater:IsActivated("wintril_shield_2") then TUNING.WINTRIL_PARRYCOOLDOWN =2 else if owner.compnents.skilltreeupdater:IsActivated("wintril_shield_1") then TUNING.WINTRIL_PARRYCOOLDOWN = 4 else TUNING.WINTRIL_PARRYCOOLDOWN = 6 end ------------------------------------------------------------------------------------- I just have no idea the correct way to deal with this error. Sorry, it seems small but I kind of need help. Link to comment https://forums.kleientertainment.com/forums/topic/159353-continual-error-message-that-end-is-expected-near/ Share on other sites More sharing options...
ClumsyPenny Posted August 26, 2024 Share Posted August 26, 2024 Try "elseif" instead of "else if". Link to comment https://forums.kleientertainment.com/forums/topic/159353-continual-error-message-that-end-is-expected-near/#findComment-1743886 Share on other sites More sharing options...
ChubbyBacon Posted August 26, 2024 Author Share Posted August 26, 2024 (edited) Sorry, the game crashed immediately again. I don't know what causes this. Never mind. This has to do with my other code. Thanks! client_log_2024-08-26-10-06-41.txt Edited August 26, 2024 by ChubbyBacon 1 Link to comment https://forums.kleientertainment.com/forums/topic/159353-continual-error-message-that-end-is-expected-near/#findComment-1743891 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