is there a way to put more things in a return?
#1

hey guys,

is there a way to put more things in a return?

so for example:
// codes here
return ShowMenuForPlayer(startmenu, playerid) HasCar[playerid] = 1;

or:

return
{
ShowMenuForPlayer(startmenu, playerid);
HasCar[playerid] = 1;
}

i already tried both of these but is there another way to make this? cuz it would be really nice and would be lot faster in my ondialogresponse cuz else i have to add: HasCar[playerid] = 1; then i have to add that on 570 lines and that takes damn much time AND makes teh script twice that huge , so anyone knows a way to make the return that way?

greets niels
Reply
#2

only way i know is to use a comma
but its not really returning both

pawn Код:
return ShowMenuForPlayer(startmenu, playerid) ,HasCar[playerid] = 1;
Reply
#3

You can put commas. But it is quite useless to do so if the return value is of no importance.
Reply
#4

well it IS important in this case XD, thnx for the help guys , didnt knew a , would make the difference XD anyways thnx
Reply
#5

No need to do this. You can merely wrap your statements within a code block and return the value to true to omit any following code.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)