ruben88 Posted January 25, 2011 Report Share Posted January 25, 2011 Salut.am aceste errori in GM!C:\DOCUME~1\RUBEN-PC\Desktop\ROMANI~1\ROMANI~1\GAMEMO~1\SU.pwn(4225) : warning 217: loose indentation C:\DOCUME~1\RUBEN-PC\Desktop\server~1\server~1\GAMEMO~1\SU.pwn(4225) : error 017: undefined symbol "cmd" C:\DOCUME~1\RUBEN-PC\Desktop\server~1\server~1\GAMEMO~1\SU.pwn(4229) : error 017: undefined symbol "strtok" C:\DOCUME~1\RUBEN-PC\Desktop\server~1\server\GAMEMO~1\SU.pwn(4229) : error 033: array must be indexed (variable "tmp") C:\DOCUME~1\RUBEN-PC\Desktop\ROMANI~1\ROMANI~1\GAMEMO~1\SU.pwn(4241) : warning 217: loose indentation Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 3 Errors. La aceasta comanda! if(strcmp(cmd, "/setskin", true) == 0) { new Skin; new tmp[256]; tmp = strtok(cmdtext, idx); Skin = strval(tmp); if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_GREY, "Usage: /setskin [0 - 299]"); if(Skin >= 300) return SendClientMessage(playerid, COLOR_GREY, "Skins: 0 - 299"); SetPlayerSkin(playerid, Skin); return 1; }Nu stiu cum le pot rezolva,dar...eu am o comanda in ladmin4v2 /setskin [iD] [sKIN ID] doar ca o pot folosi doar admin,si eu trebe sa le schinb mereu skinu la playeri )! Cum le pot rezolva? Link to comment Share on other sites More sharing options...
IcE. Posted January 25, 2011 Report Share Posted January 25, 2011 adauga sub public OnPlayerCommandText(playerid, cmdtext[]) urmatoru cod new cmd[256]; cmd = strtok(cmdtext, idx); Stiu si eu ... branza e pe bani, dar eu tot ma joc pe gratis! Link to comment Share on other sites More sharing options...
ruben88 Posted January 25, 2011 Author Report Share Posted January 25, 2011 Am pus dar ami da errorile astea! Link to comment Share on other sites More sharing options...
-=[Vyorel]=- Posted January 25, 2011 Report Share Posted January 25, 2011 Pai tu aveai la comenzi cmd apoi dupa ce ai pus ce ti-a zis -IcE- ai schimbat in cmdtext. Pana la urma cum le lasi?Pune-le la toate comenzile cmd inloc de cmdtext iar apoi unde vrei tu prin script, de preferat exact la sfarsit codul asta:strtok(const stringstrtok[], &index){ new length = strlen(stringstrtok); while ((index < length) && (stringstrtok[index] <= ' ')) { index++; } new offset = index, result[20]; while ((index < length) && (stringstrtok[index] > ' ') && ((index - offset) < (sizeof(result) - 1))) { result[index - offset] = stringstrtok[index]; index++; } result[index - offset] = EOS; return result;} ATENTIE!!! Nu imi trimiteti mesaje private care au legatura cu scriptingul. NU mai scriptez. Link to comment Share on other sites More sharing options...
ruben88 Posted January 28, 2011 Author Report Share Posted January 28, 2011 Da acm a mers dar acm ami da erruare:error 017: undefined symbol "idx" La acea comanda /setskin if(strcmp(cmd, "/setskin", true) == 0) { new Skin; new tmp[256]; Aici -> tmp = strtok(cmdtext, idx); Skin = strval(tmp); if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_GREY, "Usage: /setskin [0 - 299]"); if(Skin >= 300) return SendClientMessage(playerid, COLOR_GREY, "Skins: 0 - 299"); SetPlayerSkin(playerid, Skin); return 1; }Lam compilat si cu pawno 0.3c dar tot erroare aia mio da! Link to comment Share on other sites More sharing options...
IstuntmanI Posted January 28, 2011 Report Share Posted January 28, 2011 Lanew cmd[256]; cmd = strtok(cmdtext,idx); trebuie sa pui new idx; deci va fi asa: new cmd[256]; new idx; cmd = strtok(cmdtext,idx); Link to comment Share on other sites More sharing options...
ruben88 Posted January 28, 2011 Author Report Share Posted January 28, 2011 Aia nu ami merge ami da erruare,ce mia dat vyorel mia mers dar ami da erruarea aceia cu idx Link to comment Share on other sites More sharing options...
-=[Vyorel]=- Posted January 28, 2011 Report Share Posted January 28, 2011 Greu tare era sa adaugi o amarata de linie.if(strcmp(cmd, "/setskin", true) == 0){ new Skin; new cmd[256]; new idx; cmd = strtok(cmdtext,idx); Skin = strval(tmp); // if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_GREY, "Usage: /setskin [0 - 299]"); if(Skin >= 300) return SendClientMessage(playerid, COLOR_GREY, "Skins: 0 - 299"); SetPlayerSkin(playerid, Skin); return 1;} ATENTIE!!! Nu imi trimiteti mesaje private care au legatura cu scriptingul. NU mai scriptez. Link to comment Share on other sites More sharing options...
Question
ruben88
Salut.am aceste errori in GM!
La aceasta comanda!Nu stiu cum le pot rezolva,dar...eu am o comanda in ladmin4v2 /setskin [iD] [sKIN ID] doar ca o pot folosi doar admin,si eu trebe sa le schinb mereu skinu la playeri )! Cum le pot rezolva?
Link to comment
Share on other sites
7 answers to this question
Recommended Posts