Subj : Door game procedure.
To : All
From : Joseph Larsen
Date : Fri Jun 03 2016 08:02 am
Hi,
I'm trying to rewrite my "door" code in Impulse. I have some code:
---snip-----
procedure ab2;
begin
if (cStr(thisnode)) = 1 then
shell('/home/imp/door/doorab 1 AB2')
end else
if (cStr(thisnode)) = 2 then
shell('/home/imp/door/doorab 2 AB2')
end else
if (cStr(thisnode)) = 3 then
shell('/home/imp/door/doorab 3 AB2')
end else
if (cStr(thisnode)) = 4 then
shell('/home/imp/door/doorab 4 AB2')
end;
--snip------
"cStr" is a function to convert a string into an integer. The numbers are the
node numbers. Do I need to define "thisnode"? Or the node numbers?
I've been doing a lot of coding in C lately, and frankly, i've forgotten
A LOT of basic Pascal. I think this code pretty much speaks for itself. Could
someone please give me a few pointers?