Having trouble with the random function #1929
Answered
by
bkumanchik
bkumanchik
asked this question in
Q&A
Replies: 3 comments
-
try: assuming this is C ! The data type is specified by the function prototype so you don't specify it for the parameter, indeed if you tried to use a parameter of another kind it like a char, string or double it wouldn't compile... |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks, I'll try that
On Wednesday, August 18, 2021, 06:37:31 AM PDT, chriscamacho ***@***.***> wrote:
try:
invader_x = GetRandomValue(156, 356);
assuming this is C !
The data type is specified by the function prototype so you don't specify it for the parameter, indeed if you tried to use a parameter of another kind it like a char, string or double it wouldn't compile...
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
bkumanchik
-
That did it, thanks, I guess I didn't need to be so specific.
On Wednesday, August 18, 2021, 06:37:31 AM PDT, chriscamacho ***@***.***> wrote:
try:
invader_x = GetRandomValue(156, 356);
assuming this is C !
The data type is specified by the function prototype so you don't specify it for the parameter, indeed if you tried to use a parameter of another kind it like a char, string or double it wouldn't compile...
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
My code:
invader_x = GetRandomValue(int 156, int 356);
my error:
invader.c:151: error: identifier expected
Isn't invader_x the identifier?
Beta Was this translation helpful? Give feedback.
All reactions