(defun C:GetPente() (setq ggg (GetPente (car (entsel)))))
In the code above there is no function GetPente
(setq elev(get_tile "userinput")
would be better with a space in between elev(get_tile
(setq elev (get_tile "userinput")
I'll often comment out code if I can't work out what is going wrong - starting at the beginning so only a few lines run, and add a few lines back in at a time until I find the error, might halp with debugging especially things like no function definition or typing errors in variables