Command is dead
#1

hi i recently got a command from Cake (user) and i got these errors at first
Код:
C:\Users\Windows Vista\sampserver\gamemodes\bare.pwn(39) : error 017: undefined symbol "tmp"
C:\Users\Windows Vista\sampserver\gamemodes\bare.pwn(40) : error 017: undefined symbol "tmp"
C:\Users\Windows Vista\sampserver\gamemodes\bare.pwn(42) : error 017: undefined symbol "COLOR_GRAD2"
C:\Users\Windows Vista\sampserver\gamemodes\bare.pwn(46) : error 017: undefined symbol "ReturnUser"
C:\Users\Windows Vista\sampserver\gamemodes\bare.pwn(47) : error 017: undefined symbol "tmp"
Pawn compiler 3.2.3664			Copyright © 1997-2006, ITB CompuPhase


5 Errors.
ok then i defined a few things replaced 1 ; with an ) and then got these errors
Код:
C:\Users\Windows Vista\sampserver\gamemodes\bare.pwn(41) : error 029: invalid expression, assumed zero
C:\Users\Windows Vista\sampserver\gamemodes\bare.pwn(42) : warning 202: number of arguments does not match definition
C:\Users\Windows Vista\sampserver\gamemodes\bare.pwn(48) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Help me out please ! ! !
Reply
#2

Might help if you actually post your command...
Reply
#3

Dont Make double topics.

/cake
Reply
#4

most probably he copyed and pasted his command from another script.
Reply
#5

Its from my own script, its shuld work or he messed somthing up. because i tried it in a .new and it worked great.


/cake
Reply
#6

hey cake it possibly works i didnt know how to define it cause everytime i defined what it said i needed to define and it gave me those last errors when i paste ur regular command so if it works i need a exact way to define it so i dont get any errors or warnings can u read not to be rude but if u read it u can see i tryed to define some things and i got 2 errors and 1 warning
please reread this topic if u dont know and tell me a way to define this right plz and the command is
pawn Код:
if(strcmp(cmd, "/givepack", true) == 0)
{
  if(IsPlayerConnected(playerid))
  {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, 0x00FF00FF, "USAGE: /givepack [playerid/PartOfName] ");
return 1;
}
new para1;
para1 = ReturnUser(tmp))
tmp = strtok(cmdtext, idx);
  if(IsPlayerConnected(para1))
  {
    if(para1 != INVALID_PLAYER_ID)
    {
GivePlayerWeapon(playerid, 24, 9999); // dont
GivePlayerWeapon(playerid, 27, 9999); // touch
GivePlayerWeapon(playerid, 29, 9999); // these
GivePlayerWeapon(playerid, 31, 9999); // they
GivePlayerWeapon(playerid, 24, 9999); // work
GivePlayerWeapon(playerid, 46, 9999); // just
SetPlayerHealth(playerid, 100); // fine
SetPlayerArmour(playerid, 100); // :P
SendClientMessage(playerid, 0x00FF00FF, "The admins gave you a nice pack!");
SendClientMessage(playerid, 0x00FF00FF, "And healed you and gave you armor!");
SendClientMessage(playerid, 0x00FF00FF, "Remember, Always treat admins with repect!");

}
}
}
return 1;
}
BTW i did not make this command and take no credit with it
and heres the part that it says the errors / warning are in
Код:
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, 0x00FF00FF, "USAGE: /givepack [playerid/PartOfName] ");
return 1;
}
new para1;
para1 = ReturnUser(tmp))
heres a quote of the errors that i get when i just paste cake's command
Quote:

C:\Users\Windows Vista\sampserver\gamemodes\bare.pwn(39) : error 017: undefined symbol "tmp"
C:\Users\Windows Vista\sampserver\gamemodes\bare.pwn(40) : error 017: undefined symbol "tmp"
C:\Users\Windows Vista\sampserver\gamemodes\bare.pwn(42) : error 017: undefined symbol "COLOR_GRAD2"
C:\Users\Windows Vista\sampserver\gamemodes\bare.pwn(46) : error 017: undefined symbol "ReturnUser"
C:\Users\Windows Vista\sampserver\gamemodes\bare.pwn(47) : error 017: undefined symbol "tmp"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
Reply
#7

Do you have new tmp[256]; ?

And btw, use dcmd / zcmd, because tmp uses too much memory.
Reply
#8

ok i put new tmp[256]; and got this on compile

pawn Код:
C:\Users\Windows Vista\sampserver\gamemodes\Stunt Rampage.pwn(49) : error 006: must be assigned to an array
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
that line 49 is
pawn Код:
para1 = ReturnUser(tmp);
Reply
#9

Is para1 = ReturnUser(tmp); Defined?
Reply
#10

the whole line? returnuser is defined
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)