uen / Leveling-System

Leveling system in gLua (For DarkRP)
Other
35 stars 22 forks source link

Fixed ULX fancy log admin errors from uen/fix #103

Closed ryanm2711 closed 4 years ago

ryanm2711 commented 4 years ago

Fixed an error with ULX fancy log admin. Before this change in the code, the ulx message will not print and the server would be a presented with an error in this fashion:

[ULib] addons/ulx_557962280/lua/ulx/log.lua:450: attempt to index local 'format' (a nil value)
  1. fancyLogAdmin - addons/ulx_557962280/lua/ulx/log.lua:450
   2. call - addons/levels/lua/ulx/modules/sh/levels.lua:6
    3. __fn - lua/ulib/shared/commands.lua:943
     4. execute - lua/ulib/shared/commands.lua:1323
      5. unknown - lua/ulib/shared/commands.lua:1351
       6. unknown - lua/includes/modules/concommand.lua:54

I have rectified this issue by changing the following lines of code:

from: ulx.fancyLogAdmin(calling_ply:Nick() .. " gave "..target_ply:Nick().." "..amount) to: ulx.fancyLogAdmin(calling_ply, "#A has gave #T an xp amount of #s", target_ply, amount)

from: ulx.fancyLogAdmin(calling_ply:Nick() .. " set "..target_ply:Nick().." level to "..level) to: ulx.fancyLogAdmin(calling_ply, "#A has set #T level to #s", target_ply, level)

uen commented 4 years ago

Hi, looks good but you haven't changed the code? Also you're committing to the fix branch which should be closed. Please make a new PR with your changes on the master branch and it's good to merge :+1: