string format error..

Post Reply
icesteruk
Posts: 287
Joined: Sun Jan 20, 2013 9:16 pm

string format error..

Post by icesteruk »

I recently updated from the 2. release 4 to the 2.1 version of Mudlet and tried to install the tabbed chat and since then I keep getting this error..

LUA: ERROR running script My Prompt (Trigger398) ERROR:[string "function Trigger398()..."]:2:
attempt to index field 'Char' (a nil value)

the error is showing up in my prompt and my prompt only has this information ..
Code: [show] | [select all] lua

prompt.myhealth, prompt.mymaxhealth = tonumber(gmcp.Char.Vitals.hp), tonumber(gmcp.Char.Vitals.maxhp)
cecho(string.format(" <green>Health <white> [%d/%dh]", prompt.myhealth, prompt.mymaxhealth))

prompt.mymana, prompt.mymaxmana = tonumber(gmcp.Char.Vitals.mp), tonumber(gmcp.Char.Vitals.maxmp)
cecho(string.format(" <green>Mana<white> [%d/%dh]", prompt.mymana, prompt.mymaxmana))

prompt.healthSips = tonumber((gmcp.Char.Vitals.hp/gmcp.Char.Vitals.maxhp)*100)
prompt.manaSips = tonumber((gmcp.Char.Vitals.mp/gmcp.Char.Vitals.maxmp)*100)

cecho(string.format(" <red>Bleed: " .. god.bleeding))




Delrayne
Posts: 159
Joined: Tue Jun 07, 2011 7:07 pm
Contact:

Re: string format error..

Post by Delrayne »

make sure you have gmcp enabled in your settings. Once you enable it, you'll have to close mudlet and restart it again. If gmcp isn't enabled all gmcp related variable will be a nil value.

icesteruk
Posts: 287
Joined: Sun Jan 20, 2013 9:16 pm

Re: string format error..

Post by icesteruk »

I've been turning it on and off for the past hour trying to get it to work and still ^ that error I've had it since last night when I uninstalled the tabbed chat :(

I've even created a new profile, turned GMCP on, closed mudlet, rebooted into the new profile and loaded my system (from before i added tab chat) and closed it and rebooted and still I get that error :/

icesteruk
Posts: 287
Joined: Sun Jan 20, 2013 9:16 pm

Re: string format error..

Post by icesteruk »

seems I found the Error, the Mudbot for Aetolia is acting up with GMCP .. :/

icesteruk
Posts: 287
Joined: Sun Jan 20, 2013 9:16 pm

Re: string format error..

Post by icesteruk »

does anyone know why Id keep getting this error? I've disabled GMCP in the mudbot (whytes mapper) so its not sending NO information to GMCP but yet it keeps giving gmcp issue.. anyone know soultion?

User avatar
demonnic
Posts: 886
Joined: Sat Dec 05, 2009 3:19 pm

Re: string format error..

Post by demonnic »

if you stop using the mudbot altogether, does it work as expected? If you turn gmcp off in mudbot, i would think that would cause it to no longer tell the server it can do GMCP, which would then turn it off altogether, rather than simply passing it on to mudlet.

So I would test mudlet without mudbot in between, and if gmcp works as expected then you know that the issue is with mudbot not passing the gmcp information along properly.

icesteruk
Posts: 287
Joined: Sun Jan 20, 2013 9:16 pm

Re: string format error..

Post by icesteruk »

I've deleted the Gmcp in the mudbot config settings to call for the GMCP but yet it's still giving that error..
it works fine connecting without mudbot .. but without mudbot I don't have a map to get around ..

I deleted every trace of mudbot settings which ask for GMCP settings but yet it's still giving that issue as above..

Delrayne
Posts: 159
Joined: Tue Jun 07, 2011 7:07 pm
Contact:

Re: string format error..

Post by Delrayne »

If you play an IRE mud, it's best to use the mapping script that comes with Mudlet. You can download all their maps through mudlet, and the room numbers match the game's room numbers.

Post Reply