Ulysses
Home
Help
Ulysses
»
Ulysses Stuff
»
General Chat & Help and Support
»
Unexpected customCheck
« previous next »
Print
Pages: [
1
]
Go Down
Author
Topic: Unexpected customCheck (Read 3591 times)
0 Members and 1 Guest are viewing this topic.
Break
Newbie
Posts: 4
Karma: 0
Unexpected customCheck
«
on:
July 12, 2017, 11:19:25 am »
So I am trying to allow only certain ranks to purchase a printer.
Code: Lua
DarkRP
.
createEntity
(
"Obsidian Printer"
,
{
ent
=
"printer_crystal"
,
model
=
"models/props_junk/cardboard_box004a.mdl"
,
price
=
75000
,
max
=
1
,
cmd
=
"buyobsdianprinter"
customCheck
=
function
(
ply
)
return
ply
:
IsUserGroup
(
"bronzevip"
)
end
}
)
When I ran it through the fptje.github code viewer it came up saying there was an unexpected customCheck. I have no idea how I would fix this issue and I am hoping someone could help?
Thank you
Logged
iViscosity
Respected Community Member
Hero Member
Posts: 803
Karma: 58
Re: Unexpected customCheck
«
Reply #1 on:
July 12, 2017, 12:41:41 pm »
You forgot a comma after the line
Code: Lua
cmd
=
"buyobsdianprinter"
So Lua interprets it as the end of the entity with a random customCheck sitting there.
Logged
I'm iViscosity. I like gaming and programming. Need some help? Shoot me PM.
Break
Newbie
Posts: 4
Karma: 0
Re: Unexpected customCheck
«
Reply #2 on:
July 12, 2017, 12:58:27 pm »
That has fixed it, thank you so much!
Logged
Print
Pages: [
1
]
Go Up
« previous next »
Ulysses
»
Ulysses Stuff
»
General Chat & Help and Support
»
Unexpected customCheck