25.11.2016, 13:34
hi.i have 4 error in this code but i cant find them.help me please
errors:
code:
errors:
Код:
C:\Users\asus\Desktop\Advance RolePlay Game\gamemodes\arpg0.1.pwn(126) : error 033: array must be indexed (variable "-unknown-") C:\Users\asus\Desktop\Advance RolePlay Game\gamemodes\arpg0.1.pwn(128) : error 035: argument type mismatch (argument 4) C:\Users\asus\Desktop\Advance RolePlay Game\gamemodes\arpg0.1.pwn(129) : error 035: argument type mismatch (argument 4) C:\Users\asus\Desktop\Advance RolePlay Game\gamemodes\arpg0.1.pwn(130) : error 035: argument type mismatch (argument 4)
Код:
//it is on top of script// new create_houses_table[42][4][20]= { {"id",1,11,true}, {"canbuy",1,11,false}, {"bought",1,11,false}, {"price",1,11,false}, {"owner_id",1,11,false}, {"locked",1,11,false}, {"world",1,11,false}, {"interior",1,11,false}, {"weapon_0",1,11,false}, {"weapon_1",1,11,false}, {"weapon_2",1,11,false}, {"weapon_3",1,11,false}, {"weapon_4",1,11,false}, {"weapon_5",1,11,false}, {"weapon_6",1,11,false}, {"weapon_7",1,11,false}, {"weapon_8",1,11,false}, {"weapon_9",1,11,false}, {"weapon_10",1,11,false}, {"weapon_11",1,11,false}, {"ammo_0",1,11,false}, {"ammo_1",1,11,false}, {"ammo_2",1,11,false}, {"ammo_3",1,11,false}, {"ammo_4",1,11,false}, {"ammo_5",1,11,false}, {"ammo_6",1,11,false}, {"ammo_7",1,11,false}, {"ammo_8",1,11,false}, {"ammo_9",1,11,false}, {"ammo_10",1,11,false}, {"ammo_11",1,11,false}, {"seeds",1,11,false}, {"drugs",1,11,false}, {"money",1,11,false}, {"owner_name",2,20,false}, {"en_x",3,11,false}, {"en_y",3,11,false}, {"en_z",3,11,false}, {"ex_x",3,11,false}, {"ex_y",3,11,false}, {"ex_z",3,11,false} }; //and this in Ongamemodeinit// if(!SQL::ExistsTable("sv_houses")) { new handle=SQL::Open(SQL::CREATE,"sv_houses"); for(new i=0;i<sizeof(create_houses_table);i++) { 126: switch(create_houses_table[i][1]) { 128: case 1:SQL::AddTableEntry(handle,create_houses_table[i][0],SQL_TYPE_INT,create_houses_table[i][2],create_houses_table[i][3]); 129: case 2:SQL::AddTableEntry(handle,create_houses_table[i][0],SQL_TYPE_VCHAR,create_houses_table[i][2],create_houses_table[i][3]); 130: case 3:SQL::AddTableEntry(handle,create_houses_table[i][0],SQL_TYPE_FLOAT,create_houses_table[i][2],create_houses_table[i][3]); } } SQL::Close(handle); }