View Issue Details

IDProjectCategoryView StatusLast Update
0007041Multi Theft Auto : San AndreasServerpublic2012-05-04 12:27
ReporterarranTunaAssigned Toccw 
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Product Version 
Target Version1.3.1Fixed in Version1.3.1 
Summary0007041: toJSON and next can both give errors without location and file line
Description

The debug error:
Couldn't convert element to string, only valid elements can be sent.

Does not give a file or folder so can't be debugged as no idea where it comes from.

I think it might be JSON but the only place where I can find its usage is in the ajax resource.

TagsNo tags attached.

Activities

arranTuna

2012-05-01 21:57

manager   ~~0016571

invalid key to 'next' (nil:nil)

That too. It's strange that these two errors are suddenly coming up today as they're both only used in default MTA resources which we haven't touched in months.

x86

2012-05-01 22:16

administrator   ~~0016572

Try to reproduce with this:

local ped = createPed ( 0, 0, 0, 0 )
outputChatBox ( ped ) -- (don't use tostring for now)

arranTuna

2012-05-02 00:31

manager   ~~0016574

Last edited: 2012-05-02 00:32

local ped = createPed ( 0, 0, 0, 0 )
outputChatBox ( ped ) -- Returned: userdata: 00007F70
outputChatBox ( toJSON ( ped ) ) -- Returned: [ ]
-- Debug: Couldn't convert element to string, only valid elements can be sent. (From the toJSON line)

next()
-- Error and gives location and file line
next({}, false)
-- ERROR: invalid key to 'next'

ccw

2012-05-04 01:02

administrator   ~~0016594

Fixed in http://code.google.com/p/mtasa-blue/source/detail?r=4054

Issue History

Date Modified Username Field Change