Вощем пытаюсь сделать команду для создания дома прям из игры для рп сервера... прочитал манул по многоуровневым командам... вроде понятно все.. а ошибки и варны какие то выдает...
Code
if(strcmp(cmd, "/hnew", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid,0xFFFFFFAA,"***Èñïîëüçîâàíèå: /hnew [filename] [housetype] [hworld] ");
new houseid = strval(tmp);
new filename[10] = tmp; //251 строка
//
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid,0xFFFFFFAA,"***Èñïîëüçîâàíèå: /hnew [filename] [housetype] [hworld]");
new housetype = strval(tmp);
//
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid,0xFFFFFFAA,"***Èñïîëüçîâàíèå: /hnew [filename] [housetype] [hworld]");
new houseworld = strval(tmp);
new houseint, housecost, iX, iY, iZ;
//
switch(housetype)
{
case 1:{houseint = 10; housetype = 1; housecost = 200000; iX = 2259.7595; iY = -1135.7062; iZ = 1050.6328;} // 264 строка
case 2:{houseint = 2; housetype = 2; housecost = 300000; iX = 2468.4490; iY = -1698.3065; iZ = 1013.5078;}
case 3:{houseint = 3; housetype = 3; housecost = 400000; iX = 2496.0002; iY = -1692.4706; iZ = 1014.7422;}
case 4:{houseint = 10; housetype = 4; housecost = 500000; iX = 2269.6284; iY = -1210.4397; iZ = 1047.5625;}
case 5:{houseint = 5; housetype = 5; housecost = 600000; iX = 226.6236; iY = 1114.3126; iZ = 1080.9946;}
case 6:{houseint = 8; housetype = 6; housecost = 700000; iX = 2317.6868; iY = -1026.7524; iZ = 1050.2178;}
case 7:{houseint = 9; housetype = 7; housecost = 800000; iX = 2365.1089; iY = -1133.0795; iZ = 1050.8750;}
case 8:{houseint = 8; housetype = 8; housecost = 900000; iX = 2365.3064; iY = -1135.3292; iZ = 1050.8750;}
case 9:{houseint = 12; housetype = 9; housecost = 1000000; iX = 2324.2317; iY = -1149.0736; iZ = 1050.7101;}
}; //273 строка
new Float:pX,Float:pY,Float:pZ;
GetPlayerPos(playerid,pX,pY,pZ);
//ñîõðàíÿåì âñå â ôàéë
new iniFile = ini_createFile(filename);
if(iniFile < 0)
iniFile = ini_openFile(filename);
ini_setInteger(iniFile,"Id",houseid);
ini_setFloat(iniFile,"EntrancePos_x",pX);
ini_setFloat(iniFile,"EntrancePos_y",pY);
ini_setFloat(iniFile,"EntrancePos_z",pZ);
ini_setFloat(iniFile,"InteriorPos_x",iX);
ini_setFloat(iniFile,"InteriorPos_y",iY);
ini_setFloat(iniFile,"InteriorPos_z",iZ);
ini_setInteger(iniFile,"Interior",houseint);
ini_setInteger(iniFile,"VirtWorld",houseworld);
ini_setInteger(iniFile,"Class",housetype);
ini_setInteger(iniFile,"Cost",housecost);
ini_setInteger(iniFile,"Sale",1);
ini_setString(iniFile,"Owner","State");
ini_closeFile(iniFile);
SendClientMessage(playerid,COLOR_GREEN,"*** Äîì óñïåøíî ñîçäàí ***");
}
Ошибки и варны:
Code
D:\Users\samp\SAMP_Server_ROLEPLAY\gamemodes\roleplay.pwn(251) : error 008: must be a constant expression; assumed zero
D:\Users\samp\SAMP_Server_ROLEPLAY\gamemodes\roleplay.pwn(264) : warning 213: tag mismatch
D:\Users\samp\SAMP_Server_ROLEPLAY\gamemodes\roleplay.pwn(264) : warning 213: tag mismatch
D:\Users\samp\SAMP_Server_ROLEPLAY\gamemodes\roleplay.pwn(264) : warning 213: tag mismatch
D:\Users\samp\SAMP_Server_ROLEPLAY\gamemodes\roleplay.pwn(265) : warning 213: tag mismatch
D:\Users\samp\SAMP_Server_ROLEPLAY\gamemodes\roleplay.pwn(265) : warning 213: tag mismatch
D:\Users\samp\SAMP_Server_ROLEPLAY\gamemodes\roleplay.pwn(265) : warning 213: tag mismatch
D:\Users\samp\SAMP_Server_ROLEPLAY\gamemodes\roleplay.pwn(266) : warning 213: tag mismatch
D:\Users\samp\SAMP_Server_ROLEPLAY\gamemodes\roleplay.pwn(266) : warning 213: tag mismatch
D:\Users\samp\SAMP_Server_ROLEPLAY\gamemodes\roleplay.pwn(266) : warning 213: tag mismatch
D:\Users\samp\SAMP_Server_ROLEPLAY\gamemodes\roleplay.pwn(267) : warning 213: tag mismatch
D:\Users\samp\SAMP_Server_ROLEPLAY\gamemodes\roleplay.pwn(267) : warning 213: tag mismatch
D:\Users\samp\SAMP_Server_ROLEPLAY\gamemodes\roleplay.pwn(267) : warning 213: tag mismatch
D:\Users\samp\SAMP_Server_ROLEPLAY\gamemodes\roleplay.pwn(268) : warning 213: tag mismatch
D:\Users\samp\SAMP_Server_ROLEPLAY\gamemodes\roleplay.pwn(268) : warning 213: tag mismatch
D:\Usera\samp\SAMP_Server_ROLEPLAY\gamemodes\roleplay.pwn(268) : warning 213: tag mismatch
D:\Users\samp\SAMP_Server_ROLEPLAY\gamemodes\roleplay.pwn(269) : warning 213: tag mismatch
D:\Users\samp\SAMP_Server_ROLEPLAY\gamemodes\roleplay.pwn(269) : warning 213: tag mismatch
D:\Users\samp\SAMP_Server_ROLEPLAY\gamemodes\roleplay.pwn(269) : warning 213: tag mismatch
D:\Users\samp\SAMP_Server_ROLEPLAY\gamemodes\roleplay.pwn(270) : warning 213: tag mismatch
D:\Users\samp\SAMP_Server_ROLEPLAY\gamemodes\roleplay.pwn(270) : warning 213: tag mismatch
D:\Users\samp\SAMP_Server_ROLEPLAY\gamemodes\roleplay.pwn(270) : warning 213: tag mismatch
D:\Users\samp\SAMP_Server_ROLEPLAY\gamemodes\roleplay.pwn(271) : warning 213: tag mismatch
D:\Users\samp\SAMP_Server_ROLEPLAY\gamemodes\roleplay.pwn(271) : warning 213: tag mismatch
D:\Users\samp\SAMP_Server_ROLEPLAY\gamemodes\roleplay.pwn(271) : warning 213: tag mismatch
D:\Users\samp\SAMP_Server_ROLEPLAY\gamemodes\roleplay.pwn(272) : warning 213: tag mismatch
D:\Users\samp\SAMP_Server_ROLEPLAY\gamemodes\roleplay.pwn(272) : warning 213: tag mismatch
D:\Users\samp\SAMP_Server_ROLEPLAY\gamemodes\roleplay.pwn(272) : warning 213: tag mismatch
D:\Users\samp\SAMP_Server_ROLEPLAY\gamemodes\roleplay.pwn(273) : error 036: empty statement
Добавлено (02.09.2011, 21:12)
---------------------------------------------
че вселюди на форуме вымерли? никто помочь неможет? какой функцией значения целочисленной переменной присвоить как я это пытаюсь сделать на 264-272 строках? почему он мне там варн выдает? а какой функцией содержимое одной строки заменить на содержимое другой как я пытаюсь это сделать на 251 строке??
Добавлено (02.09.2011, 22:57)
---------------------------------------------
close тему .