C:\\Users\\Patrik\\Desktop\\Little Town GF\\gamemodes\\TraleRPG.pwn(17700) : error 001: expected token: \";\", but found \"-identifier-\"C:\\Users\\Patrik\\Desktop\\Little Town GF\\gamemodes\\TraleRPG.pwn(17707) : error 010: invalid function or declaration
CMD:festekvesz(playerid,params[]){if(IsPlayerInRangeOfPoint( playerid, 1.0, 252.1429,-56.2798,1.5703,0.1215)) { GivePlayerWeapon(playerid, 41, 10000) pInfo[playerid][pMoney] -= 500; } else { SendClientMessage(playerid, PIROS, \"Nincs elég pénzed! ($500)\"); } } else { SendClientMessage(playerid, PIROS, \"Nem vagy a festékboltban!\"); }}
//OnPlayerStateChange#if defined _ALS_OnPlayerStateChange#undef OnPlayerStateChange#else #define _ALS_OnPlayerStateChange#endif#define OnPlayerStateChange JB_OnPlayerStateChangeforward JB_OnPlayerStateChange(playerid, newstate, oldstate);//OnPlayerKeyStateChange#if defined _ALS_OnPlayerKeyStateChange#undef OnPlayerKeyStateChange#else#define _ALS_OnPlayerKeyStateChange#endif#define OnPlayerKeyStateChange JB_OnPlayerKeyStateChangeforward JB_OnPlayerKeyStateChange(playerid, newkeys, oldkeys);
stock LoadLabel(){ for(new idx = 0; idx < sizeof(LabelInfo); idx++) { new file[32]; new color; format(file,sizeof(file),\"/3DTextLabel/%d.ini\",idx); if(fexist(file)) { LabelInfo[idx][LabelText] = dini_Get(file,\"LabelText\"); LabelInfo[idx][LabelColor] = dini_Int(file,\"LabelColor\"); LabelInfo[idx][LabelLatotav] = dini_Float(file,\"LabelLatotav\"); LabelInfo[idx][LabelPosX] = dini_Float(file,\"LabelPosX\"); LabelInfo[idx][LabelPosY] = dini_Float(file,\"LabelPosY\"); LabelInfo[idx][LabelPosZ] = dini_Float(file,\"LabelPosZ\"); LabelInfo[idx][LabelVirWorld] = dini_Int(file,\"LabelVirWorld\"); LabelInfo[idx][LabelVan] = dini_Int(file,\"LabelVan\"); switch(LabelInfo[idx][LabelColor]) { case 0: color = GREEN; case 1: color = YELLOW; case 2: color = RED; } Create3DTextLabel(LabelInfo[idx][LabelText],color,LabelInfo[idx][LabelPosX],LabelInfo[idx][LabelPosY],LabelInfo[idx][LabelPosY],LabelInfo[idx][LabelLatotav],LabelInfo[idx][LabelVirWorld],0); } } return 1;}
Hali, itt mi lehet a gond? C:\\Users\\Patrik\\Desktop\\Little Town GF\\gamemodes\\TraleRPG.pwn(17700) : error 001: expected token: \";\", but found \"-identifier-\"C:\\Users\\Patrik\\Desktop\\Little Town GF\\gamemodes\\TraleRPG.pwn(17707) : error 010: invalid function or declaration CMD:festekvesz(playerid,params[]){if(IsPlayerInRangeOfPoint( playerid, 1.0, 252.1429,-56.2798,1.5703,0.1215)) { GivePlayerWeapon(playerid, 41, 10000) pInfo[playerid][pMoney] -= 500; } else { SendClientMessage(playerid, PIROS, \"Nincs elég pénzed! ($500)\"); } } else { SendClientMessage(playerid, PIROS, \"Nem vagy a festékboltban!\"); }}
if(IsPlayerInRangeOfPoint( playerid, 1.0, 252.1429,-56.2798,1.5703,0.1215))
Hali. Elkészítettem egy 3DTextLabel készítőt de egy hibát kapok mikor az OnGameModeInit alá írom h LoadLabel();itt a betöltése: stock LoadLabel(){ for(new idx = 0; idx < sizeof(LabelInfo); idx++) { new file[32]; new color; format(file,sizeof(file),\"/3DTextLabel/%d.ini\",idx); if(fexist(file)) { LabelInfo[idx][LabelText] = dini_Get(file,\"LabelText\"); LabelInfo[idx][LabelColor] = dini_Int(file,\"LabelColor\"); LabelInfo[idx][LabelLatotav] = dini_Float(file,\"LabelLatotav\"); LabelInfo[idx][LabelPosX] = dini_Float(file,\"LabelPosX\"); LabelInfo[idx][LabelPosY] = dini_Float(file,\"LabelPosY\"); LabelInfo[idx][LabelPosZ] = dini_Float(file,\"LabelPosZ\"); LabelInfo[idx][LabelVirWorld] = dini_Int(file,\"LabelVirWorld\"); LabelInfo[idx][LabelVan] = dini_Int(file,\"LabelVan\"); switch(LabelInfo[idx][LabelColor]) { case 0: color = GREEN; case 1: color = YELLOW; case 2: color = RED; } Create3DTextLabel(LabelInfo[idx][LabelText],color,LabelInfo[idx][LabelPosX],LabelInfo[idx][LabelPosY],LabelInfo[idx][LabelPosY],LabelInfo[idx][LabelLatotav],LabelInfo[idx][LabelVirWorld],0); } } return 1;} [/quote]Leírnád, hogy mit ír hibának, illetve a sort amire írja a hibát?
LabelInfo[idx][LabelText] = dini_Get(file,\"LabelText\");
format(LabelInfo[idx][LabelText], 128, dini_Get(file,\"LabelText\"));
stock LoadLabel(){ for(new idx = 0; idx < MAX_LABELS; idx++) { new file[64]; new color; format(file,sizeof(file),\"/3DTextLabel/%d.ini\",idx); if(fexist(file)) { format(LabelInfo[idx][LabelText], 256, dini_Get(file,\"LabelText\")); LabelInfo[idx][LabelColor] = dini_Int(file,\"LabelColor\"); LabelInfo[idx][LabelLatotav] = dini_Float(file,\"LabelLatotav\"); LabelInfo[idx][LabelPosX] = dini_Float(file,\"LabelPosX\"); LabelInfo[idx][LabelPosY] = dini_Float(file,\"LabelPosY\"); LabelInfo[idx][LabelPosZ] = dini_Float(file,\"LabelPosZ\"); LabelInfo[idx][LabelVirWorld] = dini_Int(file,\"LabelVirWorld\"); LabelInfo[idx][LabelVan] = dini_Int(file,\"LabelVan\"); switch(LabelInfo[idx][LabelColor]) { case 0: color = GREEN; case 1: color = YELLOW; case 2: color = COLOR_RED; } CreateDynamic3DTextLabel(LabelInfo[idx][LabelText],color,LabelInfo[idx][LabelPosX],LabelInfo[idx][LabelPosY],LabelInfo[idx][LabelPosY],LabelInfo[idx][LabelLatotav],LabelInfo[idx][LabelVirWorld],0); } } return 1;}
CreateDynamic3DTextLabel(const text[], color, Float:x, Float:y, Float:z, Float:drawdistance, attachedplayer = INVALID_PLAYER_ID, attachedvehicle = INVALID_VEHICLE_ID, testlos = 0, worldid = -1, interiorid = -1, playerid = -1, Float:distance = 100.0); [/quote]
CreateDynamic3DTextLabel(LabelInfo[idx][LabelText],color,LabelInfo[idx][LabelPosX],LabelInfo[idx][LabelPosY],LabelInfo[idx][LabelPosY],LabelInfo[idx][LabelLatotav], INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, LabelInfo[idx][LabelVirWorld],-1);