13.10.2009, 13:19
Quote:
Originally Posted by _CHoz
Код:
if(strcmp(cmd, "/buybeer", true) == 0) { new tmp[256], idx; tmp = strtok(cmdtext, idx); if( ! strlen(tmp) ) return SendClientMessage(playerid, 0xFFFFFFAA, "Usage: /buybeer [amount]"); new amount = strval(tmp); if ( GetPlayerMoney(playerid) < (amount*50) ) return SendClientMessage(playerid, 0xFFFFFFAA, "You don't have enough money to buy that amount of beer."); GivePlayerMoney( playerid, (50*amount) ); BEER[playerid] += amount; return 1; } |
I am new to scripting, thanks for helping and mind telling me how to fix these errors?
Код:
C:\Documents and Settings\home\My Documents\KingsRPG.pwn(214) : error 017: undefined symbol "cmd" C:\Documents and Settings\home\My Documents\KingsRPG.pwn(217) : error 017: undefined symbol "strtok" C:\Documents and Settings\home\My Documents\KingsRPG.pwn(217) : error 033: array must be indexed (variable "tmp") C:\Documents and Settings\home\My Documents\KingsRPG.pwn(216) : warning 203: symbol is never used: "idx" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 3 Errors.