ViperZ8 / darkrp

Automatically exported from code.google.com/p/darkrp
0 stars 1 forks source link

Timer 'FlammableProps' Error: [gamemodes/darkrp/gamemode/server/main.lua:41] attempt to perform arithmetic on local 'r' (a table value) #950

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hello,
I've been messing around and trying my own money printer; for some reason, it 
has been throwing up this error:

Timer 'FlammableProps' Error: [gamemodes/darkrp/gamemode/server/main.lua:41] 
attempt to perform arithmetic on local 'r' (a table value)

Managed to fix it with editing the gamemode/server/main.lua lines 40 to 45 as 
follows:

(...)

[40] local color = v:GetColor()
[41] if (color.r - 51)>=0 then color.r = color.r - 51 end
[42] if (color.g - 51)>=0 then color.g = color.g - 51 end
[43] if (color.b - 51)>=0 then color.b = color.b - 51 end
[44] v:SetColor(color)
[45] if (color.r + color.g + color.b) < 103 and math.random(1, 100) < 35 then

(...)

I got no clue why it was broken, I am not really an expert, just Lua beginner. 
Anyways, making the change above fixed the problem.

I thought of posting it here so you might tell me what am I doing wrong / if 
I've done good thing by reporting this bug.

-Khubajsn

Original issue reported on code.google.com by khuba...@gmail.com on 19 Sep 2012 at 6:59

GoogleCodeExporter commented 9 years ago
Please tell me this problem occurred in gmod 13 next time. I was testing in 
gmod 12.

Original comment by fpeijnen...@gmail.com on 21 Sep 2012 at 9:15

GoogleCodeExporter commented 9 years ago
I'm sorry, thought that your latest revision is for GM13?
Thank you for fixing.

Original comment by khuba...@gmail.com on 21 Sep 2012 at 9:31

GoogleCodeExporter commented 9 years ago
Note: DarkRP for gmod 13 still broken. Reason:
http://www.facepunch.com/showthread.php?t=1213363&p=37751920&viewfull=1#post3775
1920

Original comment by fpeijnen...@gmail.com on 21 Sep 2012 at 9:33

GoogleCodeExporter commented 9 years ago
http://darkrp.googlecode.com/svn/branches/beta/

Original comment by fpeijnen...@gmail.com on 21 Sep 2012 at 9:41