Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: niewymienialny
1. Niewymienialny ciąg znaków
Witam ot?? robi? co? takiego. Jak wpiszemy w 3 edit boxy kolor w postaci R,G,B to maluje nam pojazd. Zrobi?em r?wnie? tzw. podgl?d koloru, czyli wpiszemy np 255, 100, 200 to na ten kolor maluje nam dxDrawRectangle i w?a?nie przez to spami mi taki warningiem. Pr?bowa?em to zabezpieczy? tak
[lua]
if r > tonumber(255) then return end
[/lua]
lecz nic z tego :(
b??d
[lua]
expected number got non-convertible string. This warning may be an error in future versions
[/lua]
kod
c_side
[lua]
local rc = guiCreateEdit(0.31, 0.36, 0.03, 0.03, "", true)
guiSetVisible(rc, false)
guiEditSetMaxLength (rc, 3)

local gc= guiCreateEdit(0.34, 0.36, 0.03, 0.03, "", true)
guiSetVisible(gc, false)
guiEditSetMaxLength (gc, 3)

local bc = guiCreateEdit(0.39, 0.36, 0.03, 0.03, "", true)
guiSetVisible(bc, false)
guiEditSetMaxLength (bc, 3)

function gui()
local r = guiGetText(rc) or 0
local g = guiGetText(gc) or 0
local b = guiGetText(bc) or 0
dxDrawRectangle(screenW * 0.3078, screenH * 0.3991, screenW * 0.0990, screenH * 0.0278, tocolor(r, g, b, 255), false)
dxDrawText("Maluj ", screenW * 0.3078, screenH * 0.3991, screenW * 0.4057, screenH * 0.4269, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false)

end
[/lua]
B??d mam tutaj
[lua]
local r = guiGetText(rc) or 0
local g = guiGetText(gc) or 0
local b = guiGetText(bc) o...