SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 14/11/2017, 04:54 PM   #11
langit
Little Clucker
 
Join Date: Dec 2015
Posts: 40
Reputation: 0
Default Re: help error 029: invalid expression, assumed zero

Scanff + ZCMD
langit is offline   Reply With Quote
Old 14/11/2017, 04:59 PM   #12
langit
Little Clucker
 
Join Date: Dec 2015
Posts: 40
Reputation: 0
Default Re: help error 029: invalid expression, assumed zero

Quote:
Originally Posted by Kraeror View Post
Don't listen to people, which don't know what they are writing!
vehicleid is a variable defined with GetVehicleID in the code:
PHP Code:
new vehicleid GetVehicleID 
Your method is correct, but can You show me the variable JOB_TAXI, where it is created and where it is defined?
Code:
CMD:createjob(playerid, params[])
{
	static
	    type,
		id = -1;

	if (PlayerData[playerid][pAdmin] < 5)
	    return SendErrorMessage(playerid, "You don't have permission to use this command.");

	if (sscanf(params, "d", type))
	    return SendSyntaxMessage(playerid, "/createjob [type]");

	if (type < 1 || type > 9)
	    return SendErrorMessage(playerid, "Invalid type specified. Types range from 1 to 9.");

	id = Job_Create(playerid, type);

	if (id == -1)
	    return SendErrorMessage(playerid, "The server has reached the limit for jobs.");

	SendServerMessage(playerid, "You have successfully created job ID: %d.", id);
	return 1;
}
langit is offline   Reply With Quote
Old 14/11/2017, 07:17 PM   #13
Kraeror
Huge Clucker
 
Kraeror's Avatar
 
Join Date: Mar 2017
Location: Bulgaria
Posts: 298
Reputation: 13
Default Re: help error 029: invalid expression, assumed zero

Quote:
Originally Posted by langit View Post
Code:
CMD:createjob(playerid, params[])
{
	static
	    type,
		id = -1;

	if (PlayerData[playerid][pAdmin] < 5)
	    return SendErrorMessage(playerid, "You don't have permission to use this command.");

	if (sscanf(params, "d", type))
	    return SendSyntaxMessage(playerid, "/createjob [type]");

	if (type < 1 || type > 9)
	    return SendErrorMessage(playerid, "Invalid type specified. Types range from 1 to 9.");

	id = Job_Create(playerid, type);

	if (id == -1)
	    return SendErrorMessage(playerid, "The server has reached the limit for jobs.");

	SendServerMessage(playerid, "You have successfully created job ID: %d.", id);
	return 1;
}
I mean where is created and defined the VARIABLE JOB_TAXI
Kraeror is offline   Reply With Quote
Old 15/11/2017, 12:02 PM   #14
langit
Little Clucker
 
Join Date: Dec 2015
Posts: 40
Reputation: 0
Default Re: help error 029: invalid expression, assumed zero

Quote:
Originally Posted by Kraeror View Post
I mean where is created and defined the VARIABLE JOB_TAXI
thanks Kraeror, was willing to help me, but my problem is solved with this code
Code:
    if(!ispassenger)
	{
	if(PlayerData[playerid][pJob] !=JOB_TAXI && GetVehicleModel(vehicleid) == 420)
	{
            ClearAnimations(playerid);
            SendClientMessage(playerid,-1,"You need to be a taxi driver");
		}
	}
langit is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error 029: invalid expression, assumed zero | ziber Scripting Help 1 23/08/2017 09:20 PM
error 029: invalid expression, assumed zero HellixBG Scripting Help 2 25/06/2017 10:12 AM
error 029: invalid expression, assumed zero Melktert Scripting Help 5 31/03/2016 05:18 PM
error 029: invalid expression, assumed zero & warning 215: expression has no effect tboysamp Scripting Help 3 23/03/2015 05:49 PM
error 029: invalid expression, assumed zero Crypto20 Scripting Help 2 04/02/2014 10:20 PM


All times are GMT. The time now is 03:23 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.