猫史档案馆


【求助】Box3调用数据库时出现大串报错

用户:第零法则第零法则查看:0 回复:1 评论:0 创建时间:2023-09-10T11:20:52


center_image

代码:

console.clear() async function createTable() {     await db.sql`CREATE TABLE IF NOT EXISTS leaderboard (         userkey CHAR(16) NOT NULL,         gelleons INT NOT NULL,         spell LIST,         spell_combination LIST,         bag LIST     )`; } createTable()

 

async function b(userkey, gelleons){     await db.sql`INSERT INTO leaderboard(userKey, gelleons) VALUE (${userkey}, ${gelleons})` }

 

b("aaaaaaaaaaaaaaaa", 1) async function getPlayerRecord(userkey) {     for await (const row of db.sql`SELECT * FROM leaderboard WHERE userkey=${userkey} ORDER BY gelleons`) {         world.say(`${row.userkey} : ${row.gelleons}`)     } }

 

getPlayerRecord("aaaaaaaaaaaaaaaa") world.onPlayerJoin(({entity}) => {     1 })


回复

上一页1 页 / 共 1下一页
无尽之海无尽之海

用代码打出来吧,不然我帮不了你

点赞0


评论