23.02.2011, 17:53
Fui tentar colocar esse script no meu gm:
Mas esta dando erro :
linhas de erros :
Eu tambem posso ter colocado em lugar errado pois nгo sou muito bom nisso ainda, sera que vcs nгo poderia me falar os lugares correto pra postar... desde ja agradesзo xD.
Код:
new EsperarAtendimento[MAX_PLAYERS]; forward ChegouSuaVez(playerid); if(strcmp("/senha", cmd, true) == 0) { new string[60]; SendClientMessage(playerid, COLOR_GRAD1,"Vocк tirou uma senha, aguarde sua vez!...."); SetTimer("ChegouSuaVez", 10000, 0); EsperarAtendimento[playerid] = 1; for(new i = 0; i < MAX_PLAYERS; ++i) { if(PlayerInfo[i][pAdmin] > 0) { new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, sizeof(name)); format(string, sizeof(string)," %s pegou uma senha.", name); SendClientMessage(i, 0xFFFFFF, string"); } } return 1; } public ChegouSuaVez(playerid) { if(IsPlayerConnected(playerid)) { if(EsperarAtendimento[playerid] == 1) { EsperarAtendimento[playerid] = 0; } for(new i = 0; i < MAX_PLAYERS; ++i) { if(PlayerInfo[i][pAdmin] > 0) { new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, sizeof(name)); format(string, sizeof(string),"Chegou a vez do %s, vб ajuda-lo.", name); SendClientMessage(i, 0xFFFFFF, string"); } } } }
Код:
C:\DOCUME~1\space\Desktop\GMLUIZ~1\GAMEMO~1\BSL.pwn(48507) : warning 219: local variable "string" shadows a variable at a preceding level C:\DOCUME~1\space\Desktop\GMLUIZ~1\GAMEMO~1\BSL.pwn(48516) : error 035: argument type mismatch (argument 2) C:\DOCUME~1\space\Desktop\GMLUIZ~1\GAMEMO~1\BSL.pwn(48518) : error 037: invalid string (possibly non-terminated string) C:\DOCUME~1\space\Desktop\GMLUIZ~1\GAMEMO~1\BSL.pwn(48518) : warning 215: expression has no effect C:\DOCUME~1\space\Desktop\GMLUIZ~1\GAMEMO~1\BSL.pwn(48518) : error 001: expected token: ";", but found ")" C:\DOCUME~1\space\Desktop\GMLUIZ~1\GAMEMO~1\BSL.pwn(48518) : error 029: invalid expression, assumed zero C:\DOCUME~1\space\Desktop\GMLUIZ~1\GAMEMO~1\BSL.pwn(48518) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors.
Код:
new string[60]; SendClientMessage(playerid, COLOR_GRAD1,"Vocк tirou uma senha, aguarde sua vez!...."); SetTimer("ChegouSuaVez", 10000, 0); EsperarAtendimento[playerid] = 1; for(new i = 0; i < MAX_PLAYERS; ++i) { if(PlayerInfo[i][pAdmin] > 0) { new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, sizeof(name)); format(string, sizeof(string)," %s pegou uma senha.", name); SendClientMessage(i, 0xFFFFFF, string");