ERROR 1366 (HY00) at line 1?

Essentially yes, the core issue is with the % or other "random" signifiers after a class name for a vehicle. For instance, the way it used to work.....an entry of skoda% would spawn a skoda with a random color. That entry now causes issues with the latest server builds. Instead I would use these three entries on separate lines with separate spawn locations in your database.

SkodaGreen
SkodaBlue
Skoda

tl:dr - replace skoda% or skoda with any value after it with just skoda
 
If this does not work, please make sure that you have the correct delimiter for decimals. "The decimal separator on your server MUST BE a period. If it is a comma, vehicle spawning (at least) will not work correctly." This is from
ayan4m1
 
Cant wait for the standalone that prob shouldnt b there, the skoda isnt in my Namalsk server and the error still pops up
 
I had perfect values for all my objects, but yet the server did not want to restart. It took me 2 hours to pin point a tent that caused this error when restarting.

All the values were normal in it and it was not out of bounds.... I am no starting to migrate over to Bliss, tired of all the random server restarts and problems in the database.
 
I had perfect values for all my objects, but yet the server did not want to restart. It took me 2 hours to pin point a tent that caused this error when restarting.

All the values were normal in it and it was not out of bounds.... I am no starting to migrate over to Bliss, tired of all the random server restarts and problems in the database.
My server is fine except for the random tine that this error happens, i have no problems with random server restart
 
I had perfect values for all my objects, but yet the server did not want to restart. It took me 2 hours to pin point a tent that caused this error when restarting.

All the values were normal in it and it was not out of bounds.... I am no starting to migrate over to Bliss, tired of all the random server restarts and problems in the database.

you sir need to add me on skype and i will show you the light ;)

Skypename: xx_stapo19_xx
 
Replace pCleanupOOB with this:

Code:
THERE WAS AN ERROR IN THIS CODE - SEE MY CORRECTION BELOW
 
Replace pCleanupOOB with this:

Code:
BEGIN
    DECLARE intLineCount    INT DEFAULT 0;
    DECLARE intDummyCount    INT DEFAULT 0;
    DECLARE intDoLine            INT DEFAULT 0;
    DECLARE intWest                INT DEFAULT 0;
    DECLARE intNorth            INT DEFAULT 0;

    SELECT COUNT(*)
        INTO intLineCount
        FROM object_data;

    SELECT COUNT(*)
        INTO intDummyCount
        FROM object_data
        WHERE Classname = 'dummy';

    WHILE (intLineCount > intDummyCount) DO
    
        SET intDoLine = intLineCount - 1;

        SELECT ObjectUID, Worldspace
            INTO @rsObjectUID, @rsWorldspace
            FROM object_data
            LIMIT intDoLine, 1;

        SELECT REPLACE(@rsWorldspace, '[', '') INTO @rsWorldspace;
        SELECT REPLACE(@rsWorldspace, ']', '') INTO @rsWorldspace;
        SELECT REPLACE(SUBSTRING(SUBSTRING_INDEX(@rsWorldspace, ',', 2), LENGTH(SUBSTRING_INDEX(@rsWorldspace, ',', 2 -1)) + 1), ',', '') INTO @West;
        SELECT REPLACE(SUBSTRING(SUBSTRING_INDEX(@rsWorldspace, ',', 3), LENGTH(SUBSTRING_INDEX(@rsWorldspace, ',', 3 -1)) + 1), ',', '') INTO @North;

        SELECT INSTR(@West, '-') INTO intWest;
        SELECT INSTR(@North, '-') INTO intNorth;

        IF (intNorth = 0) THEN
            IF (@North != NULL) THEN
                SET @North = '';
                SELECT CONVERT(@North, DECIMAL(16,8)) INTO intNorth;
            END IF;
        END IF;

        IF (intWest > 0 OR intNorth > 15360) THEN
            DELETE FROM object_data
                WHERE ObjectUID = @rsObjectUID;
        END IF;
        
        SET intLineCount = intLineCount - 1;

    END WHILE;

END
Sry im on my phone but what is the fix line at or how different is this from the cleanOOB that causes the error
 
I just read through my fix, I made an error. The fix line is this part

Code:
        IF (intNorth = 0) THEN
            IF (@North != NULL) THEN
                SET @North = '';
                SELECT CONVERT(@North, DECIMAL(16,8)) INTO intNorth;
            END IF;
        END IF;


I wrote that really late at night. It should be like this:

Code:
        IF (intNorth = 0) THEN
            IF (@North = NULL) THEN
                SET @North = '';
                SELECT CONVERT(@North, DECIMAL(16,8)) INTO intNorth;
            END IF;
            IF (@North != NULL) THEN
                SELECT CONVERT(@North, DECIMAL(16,8)) INTO intNorth;
            END IF;
        END IF;

It's basically adding a clause in if the North value is null (because null values cannot be converted to decimal)

The whole thing should be:
Code:
BEGIN

    DECLARE intLineCount    INT DEFAULT 0;
    DECLARE intDummyCount    INT DEFAULT 0;
    DECLARE intDoLine            INT DEFAULT 0;
    DECLARE intWest                INT DEFAULT 0;
    DECLARE intNorth            INT DEFAULT 0;

    SELECT COUNT(*)
        INTO intLineCount
        FROM object_data;

    SELECT COUNT(*)
        INTO intDummyCount
        FROM object_data
        WHERE Classname = 'dummy';

    WHILE (intLineCount > intDummyCount) DO
    
        SET intDoLine = intLineCount - 1;

        SELECT ObjectUID, Worldspace
            INTO @rsObjectUID, @rsWorldspace
            FROM object_data
            LIMIT intDoLine, 1;

        SELECT REPLACE(@rsWorldspace, '[', '') INTO @rsWorldspace;
        SELECT REPLACE(@rsWorldspace, ']', '') INTO @rsWorldspace;
        SELECT REPLACE(SUBSTRING(SUBSTRING_INDEX(@rsWorldspace, ',', 2), LENGTH(SUBSTRING_INDEX(@rsWorldspace, ',', 2 -1)) + 1), ',', '') INTO @West;
        SELECT REPLACE(SUBSTRING(SUBSTRING_INDEX(@rsWorldspace, ',', 3), LENGTH(SUBSTRING_INDEX(@rsWorldspace, ',', 3 -1)) + 1), ',', '') INTO @North;

        SELECT INSTR(@West, '-') INTO intWest;
        SELECT INSTR(@North, '-') INTO intNorth;

        IF (intNorth = 0) THEN
            IF (@North = NULL) THEN
                SET @North = '';
                SELECT CONVERT(@North, DECIMAL(16,8)) INTO intNorth;
            END IF;
            IF (@North != NULL) THEN
                SELECT CONVERT(@North, DECIMAL(16,8)) INTO intNorth;
            END IF;
        END IF;

        IF (intWest > 0 OR intNorth > 15360) THEN
            DELETE FROM object_data
                WHERE ObjectUID = @rsObjectUID;
        END IF;
        
        SET intLineCount = intLineCount - 1;

    END WHILE;

END
 
Back
Top