Help With SetVehicleNumberPlate
#1

Hi, i see the return of SetVehicleNumberPlate in the 0.3c RC, and i put a command with him, i already downloaded the new server version of 0.3c but look what it happens:

Код:
if(strcmp(cmd, "/plate", true) == 0)
	{
		if (PlayerInfo[playerid][pAdmin] >= 2)
	    {
			new length = strlen(cmdtext);
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[128];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = cmdtext[idx];
				idx++;
			}
			result[idx - offset] = EOS;
  			idx++;
  			if(!strlen(result)) return SendClientMessage(playerid, COLOR_GREY, "USE: {AA3333}/plate{AFAFAF} [plate number]");
                        SetVehicleNumberplate(GetPlayerVehicleID(playerid), result)
		}
		return 1;
	}
And Return this error:
Код:
error 017: undefined symbol "SetVehicleNumberplate"
I tried to put the native in the gamemode, and warned: symbol already defined.

Please someone help
Sry for bad english :/
Reply
#2

I think it should be a big P in "plate" SetVehicleNumberPlate
Reply
#3

I agree with you, Programming is case sensitive.
let's see a example,
if you put this:

pawn Код:
#include <a_samp>

#define MessageOfTheDay "Welcome to SA:MP Forums!"

main()
{
    printf("Message of the Day: %s", MessageOfTheDay);
}
it should run perfectly, notice that letters M-O-T-D are capitalized in the word MessageOfTheDay.
Now if you put this:

pawn Код:
#include <a_samp>

#define MessageOfTheDay "Welcome to SA:MP Forums!"

main()
{
    printf("Message of the Day: %s", messageoftheday);
}
it will give the following errors:

Код:
error 017: undefined symbol "messageoftheday"
which simply means, that the system will not recognize it as a declared variable.

but well, hope this explains why it was a error.

it's SetVehiclePlateNumber
Reply
#4

hrr it's works now, sry for this and thanks guys =)
Reply
#5

No sorries, we are here to help.
Glad we helped.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)