hackmud

hackmud

Substr is not a function
So I am trying to write a script and it says that substr is not a function. (Yes, I am pretty sure that I'm calling it on a string like that:
str.substr(0, x);
)
< >
Showing 1-3 of 3 comments
Hm, this should only be occurring if str isn't actually a string. It can also happen if str is null for some reason.

I'd recommend checking to make sure that str is correctly defined and not null before you get to doing a substr call on it.

Let me know if you have anymore trouble!
Originally posted by Zido's Crashdoom:
Hm, this should only be occurring if str isn't actually a string. It can also happen if str is null for some reason.

I'd recommend checking to make sure that str is correctly defined and not null before you get to doing a substr call on it.

Let me know if you have anymore trouble!

when I checked the next day the same code worked, thanks anyway
Nice that you've got it working! :happy_creep:
< >
Showing 1-3 of 3 comments
Per page: 1530 50