Issue Information
-
#006727
-
0 - None Assigned
-
Fixed
Issue Confirmations
-
Yes (2)No (0)
Originally posted by Brynner
when you type @go mora it will warped you to moroc instead of mora map. but when you type @warp mora there is no problem. im just using the latest revision.
when you type @go mora it will warped you to moroc instead of mora map. but when you type @warp mora there is no problem. im just using the latest revision.
Originally posted by Euphy
@go only compares the first three letters, so this would be a problem.
@go only compares the first three letters, so this would be a problem.
} else if (strncmp(map_name, "morocc", 3) == 0) { town = 1; ... } else if (strncmp(map_name, "mora", 3) == 0) { town = 31;
Originally posted by Spre
w00t my first rathena stroke of genious and it works just tested it!
If you change morroc entry to..
@go mora takes you to mora,
looks like there were other conflicts in the @go and that was the remedy(name wise and i saw the remedy AFTER i changed it
)
can i hab candy now plz?
e
dit:
Oops i only posted have the code LMAO you change morocc AND moras coding and it works perfectly! .. that is if you type @go morocc instead of @go morroc when you are testing it LOL
w00t my first rathena stroke of genious and it works just tested it!
If you change morroc entry to..
} else if (strncmp(map_name, "morocc", 4) == 0) { town = 1; } else if (strncmp(map_name, "mora", 4) == 0) { town = 31;
@go mora takes you to mora,
looks like there were other conflicts in the @go and that was the remedy(name wise and i saw the remedy AFTER i changed it

can i hab candy now plz?

e
dit:
Oops i only posted have the code LMAO you change morocc AND moras coding and it works perfectly! .. that is if you type @go morocc instead of @go morroc when you are testing it LOL
Edited by Spre, 22 September 2012 - 04:59 AM.
Originally posted by Brynner
just make this only }elseif(strncmp(map_name,"morocc",4)==0){
no need to change the mora.
just make this only }elseif(strncmp(map_name,"morocc",4)==0){
no need to change the mora.
Originally posted by Spre
If you only edit
@go mora sends you to mora, but @go morroc also sends you to mora
with both changed from 3 to 4, each one sends you to the right place when the full name is typed out.
If you only edit
} else if (strncmp(map_name, "morocc", 4) == 0) { town = 1;
@go mora sends you to mora, but @go morroc also sends you to mora
with both changed from 3 to 4, each one sends you to the right place when the full name is typed out.
Originally posted by Euphy
I would suggest instead to place the mora check before morocc, given the spelling discrepancy between "Morocc" and "Morroc":
I would suggest instead to place the mora check before morocc, given the spelling discrepancy between "Morocc" and "Morroc":
} else if (strncmp(map_name, "mora", 4) == 0) { //Increase comparison to 4. town = 31; } else if (strncmp(map_name, "morocc", 3) == 0) { town = 1; ...
Originally posted by Spre
it is spelled morocc everywhere in the server side files and I believe client side aswell, so when spelled right , it won't be an issue,
I myself have never used @go mapname, I always have reserved @go NUMBER and used @warp map_name
but if you wanted then this should be the solution, same way multiple maps with multiple names are defined, but I only looked at it for..... 2 minutes.
I still believe 4 should be on all 3, when i tested the change by just changing one value it defaulted to mora after only changing morroc and vice versa with changing mora it took me to morroc.
it is spelled morocc everywhere in the server side files and I believe client side aswell, so when spelled right , it won't be an issue,
I myself have never used @go mapname, I always have reserved @go NUMBER and used @warp map_name
but if you wanted then this should be the solution, same way multiple maps with multiple names are defined, but I only looked at it for..... 2 minutes.
} else if (strncmp(map_name, "morocc", 4) == 0 || strncmp(map_name, "morroc", 4 == 0) { town = 1;
I still believe 4 should be on all 3, when i tested the change by just changing one value it defaulted to mora after only changing morroc and vice versa with changing mora it took me to morroc.
Originally posted by Brian
How about increase strncmp to 4, and add "morroc" as an alternate spelling for morocc. (Keeping the towns in numeric order.)
PS: Spre, do you want to commit?
How about increase strncmp to 4, and add "morroc" as an alternate spelling for morocc. (Keeping the towns in numeric order.)
} else if (strncmp(map_name, "morocc", 4) == 0 ||<br /> strncmp(map_name, "morroc", 4) == 0) {<br /> town = 1;<br />...<br /> } else if (strcmp(map_name, "mora") == 0) {<br /> town = 31;<br />
PS: Spre, do you want to commit?
Originally posted by Spre
Fixed at [rev=16791]
Cuz i goofed like a goober
Fixed at [rev=16791]
Cuz i goofed like a goober