p3droxp 0 Postado Março 26, 2014 Share Postado Março 26, 2014 Alguem me ajuda e pf rapido :x [26/03/2014 06:36:12] > Trigger: oncreate_players does not exist, creating it... [26/03/2014 06:36:12] OTSYS_SQLITE3_PREPARE(): SQLITE ERROR: near "INSERTON": syntax error (CREATE TRIGGER "oncreate_players"AFTER INSERTON "players"BEGIN INSERT INTO "player_skills" ("player_id", "skillid", "value") VALUES (NEW."id", 0, 10); INSERT INTO "player_skills" ("player_id", "skillid", "value") VALUES (NEW."id", 1, 10); INSERT INTO "player_skills" ("player_id", "skillid", "value") VALUES (NEW."id", 2, 10); INSERT INTO "player_skills" ("player_id", "skillid", "value") VALUES (NEW."id", 3, 10); INSERT INTO "player_skills" ("player_id", "skillid", "value") VALUES (NEW."id", 4, 10); INSERT INTO "player_skills" ("player_id", "skillid", "value") VALUES (NEW."id", 5, 10); INSERT INTO "player_skills" ("player_id", "skillid", "value") VALUES (NEW."id", 6, 10);END;) [26/03/2014 06:36:12] > Trigger: ondelete_players does not exist, creating it... [26/03/2014 06:36:12] OTSYS_SQLITE3_PREPARE(): SQLITE ERROR: near "DELETEON": syntax error (CREATE TRIGGER "ondelete_players"BEFORE DELETEON "players"FOR EACH ROWBEGIN SELECT RAISE(ROLLBACK, 'DELETE on table `players` violates foreign: `ownerid` from table `guilds`') WHERE (SELECT "id" FROM "guilds" WHERE "ownerid" = OLD."id") IS NOT NULL; DELETE FROM "account_viplist" WHERE "player_id" = OLD."id"; DELETE FROM "player_viplist" WHERE "player_id" = OLD."id" OR "vip_id" = OLD."id"; DELETE FROM "player_storage" WHERE "player_id" = OLD."id"; DELETE FROM "player_skills" WHERE "player_id" = OLD."id"; DELETE FROM "player_items" WHERE "player_id" = OLD."id"; DELETE FROM "player_depotitems" WHERE "player_id" = OLD."id"; DELETE FROM "player_spells" WHERE "player_id" = OLD."id"; DELETE FROM "player_killers" WHERE "player_id" = OLD."id"; DELETE FROM "player_deaths" WHERE "player_id" = OLD."id"; DELETE FROM "guild_invites" WHERE "player_id" = OLD."id"; DELETE FROM "bans" WHERE "type" IN (2, 5) AND "value" = OLD."id"; UPDATE "houses" SET "owner" = 0 WHERE "owner" = OLD."id";END;) Link para o comentário Compartilhar em outros sites More sharing options...
Privisorio 1 Postado Março 26, 2014 Share Postado Março 26, 2014 e muito erro para uma so db, aconselho a procurar outra mas completa, pois essa falta muitas Query Link para o comentário Compartilhar em outros sites More sharing options...
Jakimif 7 Postado Março 26, 2014 Share Postado Março 26, 2014 è sqlite ? se for execute isso CREATE TABLE "players" ( "id" INTEGER PRIMARY KEY NOT NULL, "name" VARCHAR(255) NOT NULL, "world_id" INTEGER NOT NULL DEFAULT 0, "group_id" INTEGER NOT NULL, "account_id" INTEGER NOT NULL, "level" INTEGER NOT NULL DEFAULT 1, "vocation" INTEGER NOT NULL DEFAULT 0, "health" INTEGER NOT NULL DEFAULT 100, "healthmax" INTEGER NOT NULL DEFAULT 100, "experience" INTEGER NOT NULL DEFAULT 0, "lookbody" INTEGER NOT NULL DEFAULT 10, "lookfeet" INTEGER NOT NULL DEFAULT 10, "lookhead" INTEGER NOT NULL DEFAULT 10, "looklegs" INTEGER NOT NULL DEFAULT 10, "looktype" INTEGER NOT NULL DEFAULT 136, "lookaddons" INTEGER NOT NULL DEFAULT 0, "maglevel" INTEGER NOT NULL DEFAULT 0, "mana" INTEGER NOT NULL DEFAULT 100, "manamax" INTEGER NOT NULL DEFAULT 100, "manaspent" INTEGER NOT NULL DEFAULT 0, "soul" INTEGER NOT NULL DEFAULT 0, "town_id" INTEGER NOT NULL, "posx" INTEGER NOT NULL DEFAULT 0, "posy" INTEGER NOT NULL DEFAULT 0, "posz" INTEGER NOT NULL DEFAULT 0, "conditions" BLOB NOT NULL, "cap" INTEGER NOT NULL DEFAULT 0, "sex" INTEGER NOT NULL DEFAULT 0, "lastlogin" INTEGER NOT NULL DEFAULT 0, "lastip" INTEGER NOT NULL DEFAULT 0, "save" BOOLEAN NOT NULL DEFAULT 1, "skull" INTEGER NOT NULL DEFAULT 0, "skulltime" INTEGER NOT NULL DEFAULT 0, "rank_id" INTEGER NOT NULL, "guildnick" VARCHAR(255) NOT NULL DEFAULT '', "lastlogout" INTEGER NOT NULL DEFAULT 0, "blessings" INTEGER NOT NULL DEFAULT 0, "balance" INTEGER NOT NULL DEFAULT 0, "stamina" INTEGER NOT NULL DEFAULT 151200000, "direction" INTEGER NOT NULL DEFAULT 2, "loss_experience" INTEGER NOT NULL DEFAULT 100, "loss_mana" INTEGER NOT NULL DEFAULT 100, "loss_skills" INTEGER NOT NULL DEFAULT 100, "loss_containers" INTEGER NOT NULL DEFAULT 100, "loss_items" INTEGER NOT NULL DEFAULT 100, "premend" INTEGER NOT NULL DEFAULT 0, "online" TINYINT NOT NULL DEFAULT 0, "marriage" INTEGER NOT NULL DEFAULT 0, "promotion" INTEGER NOT NULL DEFAULT 0, "deleted" INTEGER NOT NULL DEFAULT 0, "description" VARCHAR(255) NOT NULL DEFAULT '', UNIQUE ("name", "deleted"), FOREIGN KEY ("account_id") REFERENCES "accounts" ("id") ); INSERT INTO "players" VALUES (1, 'Account Manager', 0, 1, 1, 1, 0, 150, 150, 0, 0, 0, 0, 0, 110, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, '', 400, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, ''); Caso seja mysql execute isso CREATE TABLE `players` ( `id` INT NOT NULL AUTO_INCREMENT, `name` VARCHAR(255) NOT NULL, `world_id` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0, `group_id` INT NOT NULL DEFAULT 1, `account_id` INT NOT NULL DEFAULT 0, `level` INT NOT NULL DEFAULT 1, `vocation` INT NOT NULL DEFAULT 0, `health` INT NOT NULL DEFAULT 150, `healthmax` INT NOT NULL DEFAULT 150, `experience` BIGINT NOT NULL DEFAULT 0, `lookbody` INT NOT NULL DEFAULT 0, `lookfeet` INT NOT NULL DEFAULT 0, `lookhead` INT NOT NULL DEFAULT 0, `looklegs` INT NOT NULL DEFAULT 0, `looktype` INT NOT NULL DEFAULT 136, `lookaddons` INT NOT NULL DEFAULT 0, `maglevel` INT NOT NULL DEFAULT 0, `mana` INT NOT NULL DEFAULT 0, `manamax` INT NOT NULL DEFAULT 0, `manaspent` INT NOT NULL DEFAULT 0, `soul` INT UNSIGNED NOT NULL DEFAULT 0, `town_id` INT NOT NULL DEFAULT 0, `posx` INT NOT NULL DEFAULT 0, `posy` INT NOT NULL DEFAULT 0, `posz` INT NOT NULL DEFAULT 0, `conditions` BLOB NOT NULL, `cap` INT NOT NULL DEFAULT 0, `sex` INT NOT NULL DEFAULT 0, `lastlogin` BIGINT UNSIGNED NOT NULL DEFAULT 0, `lastip` INT UNSIGNED NOT NULL DEFAULT 0, `save` TINYINT(1) NOT NULL DEFAULT 1, `skull` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0, `skulltime` INT NOT NULL DEFAULT 0, `rank_id` INT NOT NULL DEFAULT 0, `guildnick` VARCHAR(255) NOT NULL DEFAULT '', `lastlogout` BIGINT UNSIGNED NOT NULL DEFAULT 0, `blessings` TINYINT(2) NOT NULL DEFAULT 0, `balance` BIGINT NOT NULL DEFAULT 0, `stamina` BIGINT NOT NULL DEFAULT 151200000 COMMENT 'stored in miliseconds', `direction` INT NOT NULL DEFAULT 2, `loss_experience` INT NOT NULL DEFAULT 100, `loss_mana` INT NOT NULL DEFAULT 100, `loss_skills` INT NOT NULL DEFAULT 100, `loss_containers` INT NOT NULL DEFAULT 100, `loss_items` INT NOT NULL DEFAULT 100, `premend` INT NOT NULL DEFAULT 0 COMMENT 'NOT IN USE BY THE SERVER', `online` TINYINT(1) NOT NULL DEFAULT 0, `marriage` INT UNSIGNED NOT NULL DEFAULT 0, `promotion` INT NOT NULL DEFAULT 0, `deleted` INT NOT NULL DEFAULT 0, `description` VARCHAR(255) NOT NULL DEFAULT '', PRIMARY KEY (`id`), UNIQUE (`name`, `deleted`), KEY (`account_id`), KEY (`group_id`), KEY (`online`), KEY (`deleted`), FOREIGN KEY (`account_id`) REFERENCES `accounts`(`id`) ON DELETE CASCADE ) ENGINE = InnoDB; INSERT INTO `players` VALUES (1, 'Account Manager', 0, 1, 1, 1, 0, 150, 150, 0, 0, 0, 0, 0, 110, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, '', 400, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, ''); Link para o comentário Compartilhar em outros sites More sharing options...
Posts Recomendados