Forum

> > CS2D > Scripts > attemp to perform arithmetic on field error
Forums overviewCS2D overview Scripts overviewLog in to reply

English attemp to perform arithmetic on field error

13 replies
To the start Previous 1 Next To the start

moved attemp to perform arithmetic on field error

loldlold123
User Off Offline

Quote
LUA ERROR: sys/lua/countrylifeluas.lua:355: attempt to perform arithmetic on field '?' (a nil value)

these codes with die hook
if playerjob[id]~=4 then          money[doctorid]=money[doctorid]+10 <-- here's 355.line
msg2(doctorid,"©255000000Someones Died You Gain 10 Dolar For Work in Morgue!@C")

i dont know what is this error...

(sry,wrongly,i open this thread to general)

old Re: attemp to perform arithmetic on field error

TimeQuesT
User Off Offline

Quote
It's like taking a glas out of the shelf and don't filling it with something. If you want to drink something from the glas you get an error : "can't drink from an empty[nil] glas!" (trolllolololol)

old Re: attemp to perform arithmetic on field error

EngiN33R
Moderator Off Offline

Quote
user loldlold123 has written
no its working, i mean there is doctor in game, and when someones died,he get 10 dollar every time, i try it its working.. but i get this error


But when I look at your code and then at your explanation it doesn't make any sense. From the code one can deduct: "if a player's job isn't ID 4, then the doctor who is SOMEONE FUCKING ELSE gets $10", while your explanation implies that "if someone dies then doctor receives $10". What? So I think you should try TC's solution (TC, I hope you don't mind me calling you TC).
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview