Orake the GM Posted May 16, 2016 Author Share Posted May 16, 2016 Hey the first error happens when i summon a pet and the top of a map.the second error happens when i summon a pet on the side of a map.can someone help me out and show me the fixed version of this code? thanks :D Link to comment Share on other sites More sharing options...
sherwin Posted May 16, 2016 Share Posted May 16, 2016 Eh, you still have that error?I don't have internet connection right now, i'm just using Mobile Data so i can't help at the moment Link to comment Share on other sites More sharing options...
Coyote Posted May 16, 2016 Share Posted May 16, 2016 Well it was problem for me too.I got it fixed after some time.Did tutorial for that while  ago http://www.freemmorpgmaker.com/thread-474.html?highlight=pet+summon Link to comment Share on other sites More sharing options...
sherwin Posted May 16, 2016 Share Posted May 16, 2016 Oh, the problem is the pet location that goes out of map boundariesfor example, the map only havex = 0 to 15y = 0 to 15and the x or y goes below 0 or greater than 15This is my hint, sorry can't help at the moment Link to comment Share on other sites More sharing options...
Diefool Posted May 16, 2016 Share Posted May 16, 2016 well you have it checking the maps highest possible x coordinate Map(mapNum).MaxXand then here you have it using the next x tile Map(mapNum).Tile(x + 1, y).Typeit's not going to even exist if you are standing on the maps max x coordinate (i.e map is 15 tiles wide, you are standing on tile 15, it will check tile 16….)same goes for the Y valuesI would of gave exact locations in the script if you would of copied the actual code into code and /code [ ]'s but you uploaded screenshots and I am not going to retype that entire code block from an image ;) Link to comment Share on other sites More sharing options...
Mohenjo Daro Posted May 16, 2016 Share Posted May 16, 2016 As it's been said, the code is trying to summon the pet off the map, so just throw in an IF THEN statement so it won't spawn or spawns somewhere else Link to comment Share on other sites More sharing options...
Orake the GM Posted May 16, 2016 Author Share Posted May 16, 2016 ok in that caseBug 1' Directional blockingIf isDirBlocked(Map(mapNum).Tile(player(index).Char(TempPlayer(index).CurChar).Pet.x, player(index).Char(TempPlayer(index).CurChar).Pet.y).DirBlock, DIR_DOWN + 1) ThenCanPetMove = FalseExit FunctionEnd IfElseCanPetMove = FalseEnd IfBug 2Case DIR_RIGHT' Check to make sure not outside of boundriesIf x <= Map(mapNum).MaxX And x > 0 ThenIf y <= Map(mapNum).MaxY And y > 0 Thenn = Map(mapNum).Tile(x + 1, y).Type' Check to make sure that the tile is walkableIf n <> TILE_TYPE_WALKABLE And n <> TILE_TYPE_ITEM And n <> TILE_TYPE_NPCSPAWN And n <> TILE_TYPE_NPCAVOID ThenCanPetMove = FalseExit FunctionEnd IfIf anyone can fix it thankyou!and Sherwin ur still alive :O what happened to you lol Link to comment Share on other sites More sharing options...
Diefool Posted May 16, 2016 Share Posted May 16, 2016 copy the code from the above tutorial into your sourcehttp://www.freemmorpgmaker.com/thread-474.html?highlight=pet+summon Link to comment Share on other sites More sharing options...
Orake the GM Posted May 16, 2016 Author Share Posted May 16, 2016 thats not the correct one i tried that, first of a have 2 problems not just one. Also the code he is replacing i dont have my codes difffrent Link to comment Share on other sites More sharing options...
Orake the GM Posted May 18, 2016 Author Share Posted May 18, 2016 *bump* Link to comment Share on other sites More sharing options...
Irij47 Posted May 18, 2016 Share Posted May 18, 2016 Which engine are you using? It would be easier for me to run it, get the error myself and fix it. Link to comment Share on other sites More sharing options...
Orake the GM Posted May 19, 2016 Author Share Posted May 19, 2016 it fixed now thankyou though!! Link to comment Share on other sites More sharing options...
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