SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 21/03/2018, 12:44 PM   #1
Zeus666
Gangsta
 
Join Date: Mar 2015
Posts: 596
Reputation: 46
Default if return error

PHP Code:
            if((CP[playerid] > 0) && (MilitarJob[playerid] == 3) && (pInfo[playerid][ZombiesKilled] >= 1)) return SendClientMessage(playerid, -1"You don't have at least 1 zombie killed!"); 


my if is given an error during the game, if i have 0 zombieskilled it still allows me to acces the command.
Zeus666 is offline   Reply With Quote
Old 21/03/2018, 01:35 PM   #2
X337
Gangsta
 
Join Date: Sep 2014
Location: Indonesia
Posts: 879
Reputation: 287
Default Re: if return error

Code:
(pInfo[playerid][ZombiesKilled] < 1)
you check if a player killed more than one zombie
__________________
viva la sa-mp
X337 is offline   Reply With Quote
Old 21/03/2018, 02:47 PM   #3
Zeus666
Gangsta
 
Join Date: Mar 2015
Posts: 596
Reputation: 46
Default Re: if return error

Quote:
Originally Posted by X337 View Post
Code:
(pInfo[playerid][ZombiesKilled] < 1)
you check if a player killed more than one zombie
still doesn't work.
Zeus666 is offline   Reply With Quote
Old 21/03/2018, 02:54 PM   #4
Jithu
Banned
 
Join Date: Jan 2018
Location: India
Posts: 81
Reputation: 3
Default Re: if return error

if(CP[playerid] == 0)

try this!
Jithu is offline   Reply With Quote
Old 21/03/2018, 03:15 PM   #5
Zeus666
Gangsta
 
Join Date: Mar 2015
Posts: 596
Reputation: 46
Default Re: if return error

someone help
Zeus666 is offline   Reply With Quote
Old 21/03/2018, 06:27 PM   #6
MadeMan
High-roller
 
MadeMan's Avatar
 
Join Date: Jun 2007
Posts: 3,489
Reputation: 256
Default Re: if return error

Quote:
Originally Posted by X337 View Post
Code:
(pInfo[playerid][ZombiesKilled] < 1)
you check if a player killed more than one zombie
I think X337 already provided the answer.
MadeMan 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
return error SacrificeGaming Scripting Help 3 09/02/2015 10:09 PM
return 1 error zrelly Scripting Help 3 25/09/2013 09:34 PM
Return 1 - How comes its an ERROR -.- Ben7544 Help Archive 2 21/07/2011 01:21 AM
Return 0; error shadowdog Help Archive 3 21/02/2011 05:14 PM
How To Get Rid Of That Error? error 079: inconsistent return types (array &..... Kamil_Silver Help Archive 3 19/07/2009 07:28 PM


All times are GMT. The time now is 06:50 PM.


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