Need help
#1

I try to learn from other systems how to build rob house,and rob veh but I got erros:

C:\Program Files\** V415\filterscripts\robbery.pwn(84) : error 001: expected token: ";", but found "enum"
C:\Program Files\** V415\filterscripts\robbery.pwn(114) : error 029: invalid expression, assumed zero
C:\Program Files\** V415\filterscripts\robbery.pwn(114) : error 004: function "OnPlayerDeath" is not implemented
C:\Program Files\** V415\filterscripts\robbery.pwn(116) : error 017: undefined symbol "wrench"
C:\Program Files\** V415\filterscripts\robbery.pwn(116) : warning 215: expression has no effect
C:\Program Files\** V415\filterscripts\robbery.pwn(116) : error 001: expected token: ";", but found "]"
C:\Program Files\** V415\filterscripts\robbery.pwn(116) : error 029: invalid expression, assumed zero
C:\Program Files\** V415\filterscripts\robbery.pwn(116) : fatal error 107: too many error messages on one line
Reply
#2

Think a little before posting ...

No one can read that code, please at least use php / code tags or upload it on gist.github / pastebin.


You should indent the code, also, we have no line numbers.
Reply
#3

Quote:
Originally Posted by [Bios]Marcel
Посмотреть сообщение
Think a little before posting ...

No one can read that code, please at least use php / code tags or upload it on gist.github / pastebin.


You should indent the code, also, we have no line numbers.
ok sory, http://pastebin.com/vT9j8F3e

thank u about the answer dear person!
Reply
#4

Quote:
Originally Posted by Learn
Посмотреть сообщение
ok sory, http://pastebin.com/vT9j8F3e

thank u about the answer dear person!
Ok, u got the pastebin part. Now please remove the code from your inital post, indent the code on pastebin and mark the lines where the errors lie.

Then ill be happy
Reply
#5

Quote:
Originally Posted by [Bios]Marcel
Посмотреть сообщение
Ok, u got the pastebin part. Now please remove the code from your inital post, indent the code on pastebin and mark the lines where the errors lie.

Then ill be happy
line 84: enum pInfo

other lines problems:
public OnPlayerDeath(playerid, killerid, reason)
{
wrench[playerid] = 0;

I can't mark the pestabin cuz I open the code without user...
Reply
#6

Quote:
Originally Posted by [Bios]Marcel
Посмотреть сообщение
Ok, u got the pastebin part. Now please remove the code from your inital post, indent the code on pastebin and mark the lines where the errors lie.

Then ill be happy
I forget a lot of information in the code, it's the problem. mabye if u can fix only the picklock part It's will help me. or give me other system of picklock I dont know...
Reply
#7

PHP код:
forward RobbedHouse(playerid
Is missing the
PHP код:

And there are unclosed brackets in OnPlayerDisconnect and OnPlayerDeath, which wouldn't happen (maybe) if you'd indent the damn code ^^
Reply
#8

Quote:
Originally Posted by [Bios]Marcel
Посмотреть сообщение
PHP код:
forward RobbedHouse(playerid
Is missing the
PHP код:

And there are unclosed brackets in OnPlayerDisconnect and OnPlayerDeath, which wouldn't happen (maybe) if you'd indent the damn code ^^
I want to make new lockpick system but I dont know how to start...
Reply
#9

Well, don't ask me.
Reply
#10

If you keep on looking for tutorials to create the systems you want, you're probably never going to do something on your own. Instead, know how things work. Apply your logic and imagination to create such systems. Suppose you're creating a feature to pick pocket - you'd have to think of these:
1) The thief should be near a player to rob them. (I would suggest IsPlayerInRangeOfPoint for beginners but I'd create my own function to check if the thief behind and closer to the player).
2) The player should have some money to be robbed. (GetPlayerMoney > 0 )
3) (more as you could imagine).

Understand how variables and arrays work. You can look into the codes of other people to try and understand. Every beginners would start with inefficient methods but they keep improving as they get to know better logic. You don't have to be an expert mathematician to write better codes, it mainly requires your logical mind. Though, being an expert in math can help you very much!

https://sampforum.blast.hk/showthread.php?tid=318212 - Array tutorial.

PS : Whenever you post code, place it inside [CODE] tag.

[CODE]
script here
[/ CODE] (I placed a space to prevent it from functioning.)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)