Raised This Month: $ Target: $400
 0% 

How to do it ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Boomd
Junior Member
Join Date: Jun 2012
Old 06-20-2012 , 13:40   How to do it ?
Reply With Quote #1

Code:
if (strcmp("/dm2", cmdtext, true, 4) == 0)
    {
    
        new rand=random(4);
        switch(rand)
        {
             case 0:
				   {
			       SetPlayerPos(playerid, 1546.2438, -1370.6609, 329.4535, 351.7194);
			       }
            case 1:
				   {
		           SetPlayerPos(playerid, 1533.0110, -1368.2948, 329.4609, 92.9270);
		           }
             case 2:
					{
			        SetPlayerPos(playerid, 1535.3623, -1349.3003, 329.4549, 332.8983);
			        }
             case 3:
					{
			        SetPlayerPos(playerid, 1541.6149, -1366.0000, 329.7969, 188.3668);
			        }
190:					SetPlayerHealth(playerid, 100);
					SetPlayerArmour(playerid, 0);
192:	                return 1;
	}
	return 0;
}

D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(190) : error 002: only a single statement (or expression) can follow each "case"

Last edited by Boomd; 06-20-2012 at 13:44.
Boomd is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 06-20-2012 , 13:42   Re: How to do it ?
Reply With Quote #2

What?
__________________
<VeCo> is offline
Boomd
Junior Member
Join Date: Jun 2012
Old 06-20-2012 , 13:44   Re: How to do it ?
Reply With Quote #3

i'm sorry forgot to put the error
Boomd is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 06-20-2012 , 13:47   Re: How to do it ?
Reply With Quote #4

These lines should be outside the switch or in the case, not between closing case and closing switch brackets.
__________________

Last edited by <VeCo>; 06-20-2012 at 13:47.
<VeCo> is offline
Old 06-20-2012, 13:47
Boomd
This message has been deleted by ConnorMcLeod. Reason: english only thanks
Old 06-20-2012, 13:48
Boomd
This message has been deleted by ConnorMcLeod. Reason: english only thanks
Boomd
Junior Member
Join Date: Jun 2012
Old 06-20-2012 , 13:48   Re: How to do it ?
Reply With Quote #5

ok,thx
Boomd is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 06-20-2012 , 13:49   Re: How to do it ?
Reply With Quote #6

That's a Source Mod thread.
Please move.
__________________
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
Boomd
Junior Member
Join Date: Jun 2012
Old 06-20-2012 , 13:50   Re: How to do it ?
Reply With Quote #7

Now when i put them outside 192: the same error
Boomd is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 06-20-2012 , 13:54   Re: How to do it ?
Reply With Quote #8

PHP Code:
case 3:
   {
     
SetPlayerPos(playerid1541.6149, -1366.0000329.7969188.3668);
     }
  
SetPlayerHealth(playerid100);
  
SetPlayerArmour(playerid0);
  return 
1;
}
return 
0

Make it:


PHP Code:
case 3:
  {
     
SetPlayerPos(playerid1541.6149, -1366.0000329.7969188.3668);
     
SetPlayerHealth(playerid100);
     
SetPlayerArmour(playerid0);
     return 
1;
  }
}
return 
0

rules: english forums -> english language
__________________

Last edited by <VeCo>; 06-20-2012 at 13:55.
<VeCo> is offline
Boomd
Junior Member
Join Date: Jun 2012
Old 06-20-2012 , 13:55   Re: How to do it ?
Reply With Quote #9

ok txn again Veco
Boomd is offline
Boomd
Junior Member
Join Date: Jun 2012
Old 06-20-2012 , 13:58   Re: How to do it ?
Reply With Quote #10

D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(46) : warning 217: loose indentation
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(47) : warning 217: loose indentation
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(95) : warning 217: loose indentation
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(112) : warning 217: loose indentation
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(140) : warning 217: loose indentation
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(176) : warning 202: number of arguments does not match definition
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(180) : warning 202: number of arguments does not match definition
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(184) : warning 202: number of arguments does not match definition
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(18 : warning 202: number of arguments does not match definition
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(192) : error 002: only a single statement (or expression) can follow each "case"
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(192) : warning 215: expression has no effect
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(194) : warning 217: loose indentation
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(196) : warning 225: unreachable code
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(196) : error 029: invalid expression, assumed zero
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(196) : error 004: function "OnPlayerEnterVehicle" is not implemented
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(201) : warning 225: unreachable code
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(201) : error 029: invalid expression, assumed zero
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(201) : error 004: function "OnPlayerExitVehicle" is not implemented
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(206) : warning 225: unreachable code
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(206) : error 029: invalid expression, assumed zero
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(206) : error 004: function "OnPlayerStateChange" is not implemented
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(211) : warning 225: unreachable code
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(211) : error 029: invalid expression, assumed zero
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(211) : error 004: function "OnPlayerEnterCheckpoint" is not implemented
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(216) : warning 225: unreachable code
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(216) : error 029: invalid expression, assumed zero
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(216) : error 004: function "OnPlayerLeaveCheckpoint" is not implemented
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(221) : warning 225: unreachable code
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(221) : error 029: invalid expression, assumed zero
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(221) : error 004: function "OnPlayerEnterRaceCheckpoint" is not implemented
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(226) : warning 225: unreachable code
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(226) : error 029: invalid expression, assumed zero
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(226) : error 004: function "OnPlayerLeaveRaceCheckpoint" is not implemented
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(231) : warning 225: unreachable code
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(231) : error 029: invalid expression, assumed zero
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(231) : error 004: function "OnRconCommand" is not implemented
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(236) : warning 225: unreachable code
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(236) : error 029: invalid expression, assumed zero
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(236) : error 004: function "OnObjectMoved" is not implemented
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(241) : warning 225: unreachable code
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(241) : error 029: invalid expression, assumed zero
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(241) : error 004: function "OnPlayerObjectMoved" is not implemented
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(246) : warning 225: unreachable code
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(246) : error 029: invalid expression, assumed zero
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(246) : error 004: function "OnPlayerPickUpPickup" is not implemented
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(251) : warning 225: unreachable code
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(251) : error 029: invalid expression, assumed zero
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(251) : error 004: function "OnVehicleMod" is not implemented
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(256) : warning 225: unreachable code
D:\igri\gta sa\GTA San Andreas\gamemodes\aaas.pwn(256) : error 029: invalid expression, assumed zero

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


26 Errors.

WOW
Boomd is offline
Reply



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

Forum Jump


All times are GMT -4. The time now is 06:13.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode