ID:171816
 
I keep getting this runtime in my code, I don't know what it means.

runtime error: Cannot read "Nothing".name
proc name: Stat (/mob/Stat)
source file: Statpanel.dm,259
usr: Kix (/mob/Newchar)
src: Kix (/mob/Newchar)
call stack:
Kix (/mob/Newchar): Stat()
If I had to guess, I'd say you've set a variable to text and are trying to use it as an object. Show the code around the error if you still can't figure it out. =)
You don't know what that means, but you own a game that's on the published list? BLARR! If the runtime is not obvious itself, it's telling you that Number is in text-string and not a num! If you want Number to be a num, then use the text2num() procedure as so:
Number=text2num(Number)
In response to JohnReaper
The problem is, I need it as a text, due to it being such a big number, otherwise its in Scientfic Notation, and well, I hate SN.

Edit: Mind you, this is only in the statpanel, it isnt a text anywhere else.
In response to Metroid
Well, you either have it not work, or you have scientific notation. Your choice.
In response to Metroid
I'd only use num2text when displaying this number then.
In response to JohnReaper
Check my edit, because it shouldnt be giving problems then.
In response to YMIHere
It is. its like
stat("Stat","[num2text(stat)]")

Also mind you, this is the only player with this runtime. Everyone else does not get it.
In response to Metroid
Oh, I see it now! My fault, it has nothing to do with numbers. =| The problem is an atom is in a text string! Sorry.

Look up: Statpanel.dm,259 and post the line/s.
In response to JohnReaper
How the hell did I put an atom in a text string X_X Okay, ill look it over.
In response to JohnReaper
I was wondering where you got that number from. =)
In response to JohnReaper
Here they are

        if(monsterinparty != null)
statpanel("Summon")
stat("Name:","[monsterinparty.name]")//line 259
stat(null)
In response to YMIHere
Since my DreamMaker and DreamSeeker programs are being fuzzled, I've been unable to program for a bit, therefore making me "soft". I need to program! *drools*
In response to Metroid
Metroid wrote:
Here they are

>       if(monsterinparty != null)
> statpanel("Summon")
> stat("Name:","[monsterinparty.name]")//line 259
> stat(null)
>


First of all, you shouldn't have "stat(null)". It's ugly. Anyway, monsterinparty isn't a reference, it's text. So you can do "stat("Name:",monsterinparty)" or leave it the way it is, but when adding to mob.monsterinparty, do "monsterinparty=monster" instead of "monsterinparty="monster"".
In response to Metroid
How are you setting monsterinparty? It looks like you've set it to "Nothing" somewhere, set it to null (without any quotes, or it will turn into a string) if that's the case.
In response to YMIHere
Oh, I think I get the giffy of it! You have "Nothing" as the base value for monsterinparty. If so, instead of having "if(monsterinparty != null)" you should check if monsterinparty isn't "Nothing" like so: "if(monsterinparty!="Nothing")"
In response to JohnReaper
It's starting as null.

mob
var
mob/monsterinparty = null


What I think is Kix the player thats getting the runtime, set his monster's name to Nothing and maybe its messing up.
In response to YMIHere
It's because I misread "Nothing" for "Number" and got confused. =/
In response to Metroid
Then you are probably setting monsterinparty to the monsters name. Set it to the monster itself.
In response to Metroid
You don't need the .name part in the statpanel, you're all ready adding the name to the variable.
Page: 1 2