thegrb93 / StarfallEx

Starfall, but with active development and more features. Write Garry's mod chips similar to E2, but in lua
https://discord.gg/yFBU8PU
Other
198 stars 111 forks source link

Some bugs with code uploading #422

Closed CornerPin closed 6 years ago

CornerPin commented 6 years ago

Placing Starfall chip with open settings or SFHelper tab breaks code uploading on your client with Invalid main file error. Next time you try to upload the code, it will be Cannot upload SF code, please wait for the current upload to finish.. However, after approx. 3-4 minutes the error disappears and you can upload normally.

CornerPin commented 6 years ago

Also, running this code:

--@server
print "hi"

produces this serverside error:

addons/starfallex/lua/entities/starfall_processor/init.lua:62: attempt to index field 'scriptnames' (a nil value)
stack traceback:
    addons/starfallex/lua/entities/starfall_processor/init.lua:62: in function 'SendCode'
    addons/starfallex/lua/entities/starfall_processor/shared.lua:82: in function 'SetupFiles'
    addons/starfallex/lua/weapons/gmod_tool/stools/starfall_processor.lua:115: in function 'callback'
    addons/starfallex/lua/starfall/transfer.lua:194: in function 'callback'
    addons/starfallex/lua/starfall/transfer.lua:35: in function <addons/starfallex/lua/starfall/transfer.lua:30>
    [C]: in function 'xpcall'
    addons/starfallex/lua/starfall/netstream.lua:60: in function 'Remove'
    addons/starfallex/lua/starfall/netstream.lua:50: in function 'Read'
    addons/starfallex/lua/starfall/netstream.lua:204: in function 'func'
    lua/includes/extensions/net.lua:32: in function <lua/includes/extensions/net.lua:17>
addons/starfallex/lua/entities/starfall_processor/init.lua:62: attempt to index field 'scriptnames' (a nil value)
  1. SendCode - addons/starfallex/lua/entities/starfall_processor/init.lua:62
   2. func - addons/starfallex/lua/entities/starfall_processor/init.lua:127
    3. unknown - lua/includes/extensions/net.lua:32

and Cannot upload SF code, please wait for the current upload to finish. message appears again.

If I add --@name, delete --@server line or change it to --@client, it won't throw an error.

thegrb93 commented 6 years ago

Fixed error with files without a name. I'll do the other fix after I get some sleep

thegrb93 commented 6 years ago

Should be fixed now