16.08.2010, 23:25
Hey guys, it's me again =(
I made a simple cmd, but anything's wrong...
The script starts at Line 8022 (dcmd_curse)
Can anyone help me, please? O.o
I made a simple cmd, but anything's wrong...
Код:
dcmd_curse(playerid,params[]) { #pragma unused params if(AccInfo[playerid][pVip] == 5) { if(!strlen(params)) return SendClientMessage(playerid, LIGHTBLUE2, "Usage: /curse [PlayerID]") && SendClientMessage(playerid, orange, "Function: Will Curse the specified player!"); new Player1[MAX_PLAYER_NAME]; new string[128]; new player1; player1 = strval(params);//lol where did u copy this from if(AccInfo[player1][curse] == 0) { curse[playerid] = Create3DTextLabel("CURSED",0x000000AA,30.0,40.0,50.0,40.0,0); Attach3DTextLabelToPlayer(curse[playerid], player1, 0.0, 0.0, 0.7); GetPlayerName(playerid,Player1,sizeof(Player1)); format(string,sizeof(string),"Dark Lord %s has cursed &s!",playername,Player1); SendClientMessageToAll(RED,string); AccInfo[player1][curse] = 1; SetPlayerHealth(player1,1); SetPlayerArmour(player1,1); } else { AccInfo[player1][curse] = 0; SpawnPlayer(player1); Delete3DTextLabel(curse[playerid]); new string[44]; GetPlayerName(playerid, Player1, sizeof(Player1)); format(string, sizeof(string), "Dark Lord %s has released %s!",playername,Player1); SendClientMessageToAll(RED,string); } return 1; } else return ErrorMessages(playerid, 21); }
Код:
C:\Users\Niko\Desktop\NEW SERVER\filterscripts\LuxAdmin.pwn(8036) : error 033: array must be indexed (variable "curse") C:\Users\Niko\Desktop\NEW SERVER\filterscripts\LuxAdmin.pwn(8041) : error 017: undefined symbol "playername" C:\Users\Niko\Desktop\NEW SERVER\filterscripts\LuxAdmin.pwn(8043) : error 033: array must be indexed (variable "curse") C:\Users\Niko\Desktop\NEW SERVER\filterscripts\LuxAdmin.pwn(8049) : error 033: array must be indexed (variable "curse") C:\Users\Niko\Desktop\NEW SERVER\filterscripts\LuxAdmin.pwn(8052) : warning 219: local variable "string" shadows a variable at a preceding level C:\Users\Niko\Desktop\NEW SERVER\filterscripts\LuxAdmin.pwn(8054) : error 017: undefined symbol "playername"
Can anyone help me, please? O.o