darhal Posted September 2, 2013 Share Posted September 2, 2013 (edited) I have a problem in pizza job in Client side here is the code function () local pizzadriver = getVehicleController (source) if pizzaVehicles [getElementModel (source)] and pizzaSkins [getElementModel (pizzadriver)] then GUIEditor = { gridlist = {}, label = {} } GUIEditor.gridlist[1] = guiCreateGridList(586, 161, 204, 172, false) pizzasLeft = guiCreateLabel (590, 182, 195, 55, "PIZZAS LEFT: " .. getElementData (source, "pizzajob.pizzas"), false) elseif not getElementData (source, "pizzajob.pizzas") then pizzasLeft = guiCreateLabel (590, 254, 195, 55 "PIZZAS LEFT: 0", false) end if not pizzadriver then return end outputChatBox (" Deliver Pizzas to marked areas on your radar!", 255, 255, 0, true) guiSetFont (pizzasLeft, "default-bold-small") guiLabelSetColor (pizzasLeft, 255, 100, 0) bindKey ("mouse1", "down", throwPizza, pizzadriver) refillPizza = createMarker (2096.6, -1807, 12.5, "cylinder", 3.5, 255, 255, 50, 90, pizzadriver) if isElement (pizzaHouse) and isElement (pizzaHouseBlip) then return triggerEvent ("startPizzaboy", pizzadriver) end end ) the fellowing message appear in debugscript 3 attempt to concatenate a boolean value at line 9 and another error at line 11 plz help Edited September 3, 2013 by Guest Link to comment
Castillo Posted September 2, 2013 Share Posted September 2, 2013 Are you sure that the error isn't on this line? pizzasLeft = guiCreateLabel (590, 182, 195, 55, "PIZZAS LEFT: " .. getElementData (source, "pizzajob.pizzas"), false) Link to comment
darhal Posted September 3, 2013 Author Share Posted September 3, 2013 yes yes it is !!! and if i fix this line another error appear in this line pizzasLeft = guiCreateLabel (590, 254, 195, 55 "PIZZAS LEFT: 0", false) Link to comment
csiguusz Posted September 3, 2013 Share Posted September 3, 2013 Only a coma was missing, you could have found it by yourself. pizzasLeft = guiCreateLabel (590, 254, 195, 55, "PIZZAS LEFT: 0", false) Link to comment
darhal Posted September 3, 2013 Author Share Posted September 3, 2013 ah ty and this line ? pizzasLeft = guiCreateLabel (590, 182, 195, 55, "PIZZAS LEFT: " .. getElementData (source, "pizzajob.pizzas"), false) Link to comment
Baseplate Posted September 3, 2013 Share Posted September 3, 2013 Use localPlayer instead of source. pizzasLeft = guiCreateLabel (590, 182, 195, 55, "PIZZAS LEFT: " .. getElementData (localPlayer, "pizzajob.pizzas"), false) Link to comment
Castillo Posted September 3, 2013 Share Posted September 3, 2013 And you may want to convert that to string, or make a check in case the player has no data. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now