This site requires JavaScript, please enable it in your browser!
Greenfoot
Username
Password
Remember Me?
Sign Up, Lost Password
Activity
About
Documentation
Download
Discuss
Scenarios
MrMinestrone
wrote ...
2021/5/24
How do I declare the value of a variable as i create an actor
MrMinestrone
2021/5/24
#
f f = new f(); f.pstart = 10; addObject(f,403,191);
Here's my code, can I declare the variable pstart as I create the object f.
Yusj
2021/5/24
#
You need declare the value in the bracket.
MrMinestrone
2021/5/24
#
which brackets, the ones in the first or third line, also I declared the variable in the actor if that's what u mean
Yusj
2021/5/24
#
yep ,if u wanna declare the value of pstart ,its correct.
You need to login to post a reply.
X