SA-MP Forums Archive
Command is dead - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Command is dead (/showthread.php?tid=110369)



Command is dead - [WF]Demon - 26.11.2009

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 ! ! !


Re: Command is dead - miokie - 26.11.2009

Might help if you actually post your command...


Re: Command is dead - Daniel_Truk - 26.11.2009

Dont Make double topics.

/cake


Re: Command is dead - shady91 - 26.11.2009

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


Re: Command is dead - Daniel_Truk - 26.11.2009

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


Re: Command is dead - [WF]Demon - 26.11.2009

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



Re: Command is dead - Hiitch - 27.11.2009

Do you have new tmp[256]; ?

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


Re: Command is dead - [WF]Demon - 27.11.2009

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);



Re: Command is dead - Daniel_Truk - 27.11.2009

Is para1 = ReturnUser(tmp); Defined?


Re: Command is dead - [WF]Demon - 27.11.2009

the whole line? returnuser is defined