Raised This Month: $ Target: $400
 0% 

[SOLVED] Function for new map[ 32 ] ?!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
KadiR
Unnecessary Member
Join Date: Aug 2008
Location: Zürich / Switzerland
Old 10-06-2009 , 13:47   [SOLVED] Function for new map[ 32 ] ?!
Reply With Quote #1

What does really the function:

PHP Code:
new map32 
and what does the '' 32 '' mean ?

Last edited by KadiR; 10-06-2009 at 14:36.
KadiR is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-06-2009 , 13:56   Re: Function for new map[ 32 ] ?!
Reply With Quote #2

It's not a function. You declare and initialize a variable named "map". It creates an array of 32 cells. An array index start to 0. eg: if you save the string "de_dust2" in this variable, map will contain the string like that :

0 : d
1 : e
2 : _
3 : d
4 : u
5 : s
6 : t
7 : 2
etc..

I'm bad to explain, see this tuto : http://forums.alliedmods.net/showthread.php?t=94381
__________________
Arkshine is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 10-06-2009 , 14:00   Re: Function for new map[ 32 ] ?!
Reply With Quote #3

Variable, string.
__________________
xPaw is offline
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 10-06-2009 , 14:04   Re: Function for new map[ 32 ] ?!
Reply With Quote #4

And this is good to:

http://forums.alliedmods.net/showthr...=block+numbers
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
KadiR
Unnecessary Member
Join Date: Aug 2008
Location: Zürich / Switzerland
Old 10-06-2009 , 14:08   Re: Function for new map[ 32 ] ?!
Reply With Quote #5

ah, thanks now I understand it

I wanted to run the plugin only on that map and added this after register_plugin:

PHP Code:
    new map10 ];
    
get_mapnamemapcharsmaxmap ) );
    
    if( 
equalmap"surf_ski_2" ) )
    { 
but it says every time:

Quote:
Error: Expected token: "}", but found "-end of file-"
KadiR is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 10-06-2009 , 14:12   Re: Function for new map[ 32 ] ?!
Reply With Quote #6

More code ..

Also make array size to 1 char more (11), overthise it wont run the code in that if()
__________________
xPaw is offline
KadiR
Unnecessary Member
Join Date: Aug 2008
Location: Zürich / Switzerland
Old 10-06-2009 , 14:35   Re: Function for new map[ 32 ] ?!
Reply With Quote #7

solved, thanks

I forgot to add another }
KadiR is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-06-2009 , 14:44   Re: [SOLVED] Function for new map[ 32 ] ?!
Reply With Quote #8

You should really to take a look at the tutos section. ;)
__________________
Arkshine is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 10-07-2009 , 07:25   Re: [SOLVED] Function for new map[ 32 ] ?!
Reply With Quote #9

) he forgot to add an }

he had :

Code:
 
public plugin_init
{
code
new map bla bla
 
while
{
}
if{
}
 
}
somthing like this
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
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 22:38.


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