Jump to content

trajik

Members
  • Posts

    31
  • Joined

  • Last visited

Everything posted by trajik

  1. I still don't understand....I substituted string.len with tonumber and it still doesn't work.
  2. function checkAllInputsAreValid() local hasError = false local NameBox = guiGetText(NameBox) local weightInput = guiGetText(weightInput) local heightInput = guiGetText(heightInput) local ageInput = guiGetText(ageInput) local bioInput = guiGetText(bioInput) if ( string.len(NameBox) < 1) then hasError = true outputDebugString("name") elseif (string.len(weightInput) < 50 or tonumber(weightInput) > 150) then hasError = true outputDebugString("weight") elseif ( string.len(heightInput) == 0 or tonumber(heightInput) < 150 or tonumber(heightInput) > 200) then hasError = true outputDebugString("height") elseif ( string.len(ageInput) == 0 or tonumber(ageInput) < 4 or tonumber(ageInput) > 7) then hasError = true outputDebugString("age") elseif ( string.len(bioInput) < 30) then hasError = true outputDebugString("bio") end now shouldn't this code make it so my guiEdits must have a value within the functions parameters? in the Debugscript it says the error is in weight however when I disable it it says the error is with Height and so on.
  3. Thanks that was it it worked it was driving me crazy thank you again
  4. it's simple you would just change function doSomething() outputChatBox ("you can preform less than basic script editing yayyyy") end addCommandHandler("randomCommand", doSomething) into: function doSomething() outputChatBox ("you can preform less than basic script editing yayyyy") end addCommandHandler("theCommandIwant", doSomething) and tadaaaa
  5. trajik

    createobject

    is that the whole code? if so you need a handler to call your functions example: onResourceStart, getRootElement(), function() local x,y,z = getElementPosition( source ) createObject ( 2993, x, y, z, 120, 0, 0 ) outputChatBox("Party started", source, 0, 255, 0, true) end or another possibility could be to name the function and call it that way example: function makeStuff() local x,y,z = getElementPosition( source ) createObject ( 2993, x, y, z, 120, 0, 0 ) outputChatBox("Party started", source, 0, 255, 0, true) end onResourceStart, getRootElement(), makeStuff
  6. solved can close the thread
×
×
  • Create New...