PDA

View Full Version : Undefined Symbol isnull & params


ZBits
08/08/2012, 01:51 PM
as the Topic says i am getting these errors


C:\Users\Sony\Desktop\USA Gang Wars TDM\gamemodes\Usagangwarsv1.3.pwn(2912) : error 017: undefined symbol "isnull"
C:\Users\Sony\Desktop\USA Gang Wars TDM\gamemodes\Usagangwarsv1.3.pwn(2913) : error 017: undefined symbol "params"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.


the lines are

if(isnull(params))return SendClientMessage(playerid, COLOR_SININE, "USAGE: /startrace [racename]");
LoadRace(playerid, params);

Need help

ZBits
08/08/2012, 02:30 PM
bump!

AndreT
08/08/2012, 02:42 PM
ZeRoGoD;2041504']new params
new isnull
Actually, that's just pure bullshit.

If you have NO IDEA what you're doing, do not post in the help topics. Jesus.

To the thread author: something makes me assume you want to create commands like this:
COMMAND:startrace(playerid, params[])
{
if(isnull(params))
{
// SendClientMessage
return true;
}
// Etc
return true;
}

For this purpose, you will need zcmd (http://forum.sa-mp.com/showthread.php?t=91354) and the isnull define (which is included in zcmd).

Jarnu
08/08/2012, 02:44 PM
This is the isnull params define

#if !defined isnull
#define isnull(%1) \
((!(%1[0])) || (((%1[0]) == '\1') && (!(%1[1]))))
#endif

ZBits
08/08/2012, 02:47 PM
if i am using dcmd what should i do then?

SuperViper
08/08/2012, 02:55 PM
Make sure the define is above the command.

ZBits
08/08/2012, 03:02 PM
after i put the define get these error

C:\Users\Sony\Desktop\USA Gang Wars TDM\gamemodes\Usagangwarsv1.3.pwn(3329) : error 017: undefined symbol "params"
C:\Users\Sony\Desktop\USA Gang Wars TDM\gamemodes\Usagangwarsv1.3.pwn(3329) : error 029: invalid expression, assumed zero
C:\Users\Sony\Desktop\USA Gang Wars TDM\gamemodes\Usagangwarsv1.3.pwn(3329) : error 017: undefined symbol "params"
C:\Users\Sony\Desktop\USA Gang Wars TDM\gamemodes\Usagangwarsv1.3.pwn(3329) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.