so I am trying to create a game blackjack in plsql, i plan on using 2 procedures that will give me values such as king of spade, 2 of hearts, etc. The main part is the problem where i create the loops and such, I CANNOT CALL THE PROCEDURE.
I tried to call it and sqlplus gives me an error saying 'procedurename' is not a procedure or is undefined which is totally bs.. because i created it and it is in schema so i should be able to use it, its probably just i am calling it wrong or something.
also if i want the variable values in the procedure such as x=1 and i want the value of x to be in my main driver, how do i call it? any changes on the procedure and how do i get it from main?
this is my main
DECLARE
draw integer;
face varchar2(10);
BEGIN
draw;
END;
i want to call draw and i want the values integer and face inside my procedure which are these
create or replace procedure draw is
draw integer;
face varchar2(10);
BEGIN
select dbms_random.value(1,13) into draw from dual;
if draw = 11 then
draw := 10;
face := 'Jack';
dbms_output.put_line(face|| ' of ');
elsif draw = 12 then
draw := 10;
face := 'Queen';
dbms_output.put_line(face|| ' of ');
elsif draw = 13 then
draw := 10;
face := 'King';
dbms_output.put_line(face|| ' of ');
elsif draw = 1 then
face := 'Ace';
dbms_output.put_line(face|| ' of ');
else
dbms_output.put_line(draw|| ' of ');
end if;
END;
thanks in advance smart folks a.k.a experienced programmers!