TrashBoat Posted August 14, 2018 Posted August 14, 2018 So Im trying to make a simple 2d game and make some sort of collision detection so why not to make a 2 dimensional array but i have no clue how to write it in multiple lines Global $map[5,5] = [0,0,0,0,0 _ [0,0,0,0,0 _ [0,0,0,0,0 _ [0,0,0,0,0 _ [0,0,0,0,0] something like this but it doesn't work
FrancescoDiMuro Posted August 14, 2018 Posted August 14, 2018 (edited) Try in this way: Global $map[5][5] = [[0,0,0,0,0], _ [0,0,0,0,0], _ [0,0,0,0,0], _ [0,0,0,0,0], _ [0,0,0,0,0]] Edited August 14, 2018 by FrancescoDiMuro TrashBoat 1 Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now