Uhm, problem D: - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Uhm, problem D: (
/showthread.php?tid=332795)
Uhm, problem D: -
Trawltrawl - 09.04.2012
Herro people.
I had an idea which i actully liked, and tried to script it, but eventually it leaded to a failure (:
-
So What I'm trying to do is command "expand"
if you got 1000$, you can expand.
Here's my script
warning: I know, im not that scripter, i didn't copy anything, i just tried my luck, and i got 3 errors, so please don't reply with "what the **** is this? Its not even a code!" D:
pawn Код:
if (strcmp("/buyboundries1", cmdtext, true, 10) == 0)
{
if(GetPlayerMoney(playerid) < 1000); // here 244
{
SendClientMessage(playerid, 0xFF00000AA,"You don't have enough money");
}
else // here 248
{
if(GetPlayerMoney(playerid) >= 1000); // here 250
{
SendClientMessage(playerid, 0xFFFF00AA,"Congratulations, you've unlocked a new world boundries!");
SetPlayerWorldBounds(playerid, 10000, 10000, 20000, 20000);
}
}
return 1;
}
Haha, i tried to make it all my own, but i failed
Here's the errors
Код:
C:\Users\User\Desktop\Scripting\gamemodes\wassim.pwn(244) : error 036: empty statement
C:\Users\User\Desktop\Scripting\gamemodes\wassim.pwn(248) : error 029: invalid expression, assumed zero
C:\Users\User\Desktop\Scripting\gamemodes\wassim.pwn(250) : error 036: empty statement
and please, i want a fix with strcmp (inb4 dcmd or other stuff)
So thanks!
Again, don't complain about nonsense tried my best
Re: Uhm, problem D: -
Libra_PL - 09.04.2012
Код:
if (strcmp("/buyboundries1", cmdtext, true, 10) == 0)
{
if(GetPlayerMoney(playerid) < 1000) // here 244
{
SendClientMessage(playerid, 0xFF00000AA,"You don't have enough money");
}
else // here 248
{
if(GetPlayerMoney(playerid) > 1000) // here 250
{
SendClientMessage(playerid, 0xFFFF00AA,"Congratulations, you've unlocked a new world boundries!");
SetPlayerWorldBounds(playerid, 10000, 10000, 20000, 20000);
}
}
return 1;
}
When you are using "if". don't use ";".
This forum requires that you wait 120 seconds between posts. Please try again in 47 seconds. - so I think someone will be faster than me then...
Re: Uhm, problem D: -
Trawltrawl - 09.04.2012
THANKS!
Respected
Re: Uhm, problem D: -
emokidx - 09.04.2012
edit:late
Re: Uhm, problem D: -
Trawltrawl - 09.04.2012
Hello, I FACED Another problem.
The script works well, but why when i die the boundries are set to normal again?