| 08-01-2007, 03:51 AM | #1 |
Whenever I put this into my map, it causes the editor to crash. Its supposed to detect when thers a "\" and then add another. I think its because the "\" causes the rest of the code to comment. Does anyone know how to represent it without causing it to comment? JASS:function JassiflyString takes string taken returns string local integer counter = 1 local string sub = "" local string final = "" loop exitwhen sub = SubString( taken,counter,counter ) if (sub == "\" ) then set final = SubString( taken,1,counter) + "\" set final = SubString( sub,counter+2, StringLength) endif endloop return final endfunction |
| 08-01-2007, 04:12 AM | #2 |
"\\"
Edit: BTW, SFX paths use single \. It's just the JASS lexer which uses \ for control codes and \\ to represent \. |
| 08-01-2007, 04:21 AM | #3 |
hmm map still crashes |
| 08-01-2007, 05:07 AM | #4 |
since you are using the normal editor it could be anything that makes it crash but: JASS:call effectgiberish("abilities\\spells\\thunderclap.mdl") If it is still crashes post the code you are trying to type |
| 08-01-2007, 05:11 AM | #5 |
whatever editor also cause my WE to crash, but its random crash, no reason. It just crash when it wants. This is a bit off topic btw |
| 08-01-2007, 05:16 AM | #6 |
i did post the code its at the top |
| 08-01-2007, 05:20 AM | #7 |
JASS:function JassiflyString takes string taken returns string local integer counter = 1 local string sub = "" local string final = "" loop exitwhen sub = SubString( taken,counter,counter ) if (sub == "\\" ) then set final = SubString( taken,1,counter) + "\\" set final = SubString( sub,counter+2, StringLength) endif endloop return final endfunction this should work... Edit: you didnt set an exitwhen condition there. Which will cause an infinite loop and crash |
| 08-01-2007, 06:11 AM | #8 |
Your jass needs to compile with "\\" for a single "\" regardless if it is for a SFX or just a string. |
| 08-01-2007, 06:15 AM | #9 |
you cant pass path string with single "/" to map, you cant Jassifly string becouse it already passed as "Jassiflyed" |
