Strange Error? [REP+]
#1

Hi, I keep getting this error with the DynamicRadioStations Include

pawn Код:
AddRadioStation("181.FM - Kickin' Country - Today's BEST Country!","http://yp.shoutcast.com/sbin/tunein-station.pls?id=1283687");//Error is here

Quote:
Originally Posted by Pawn Compiler
C:\Users\sean mcelholm\Desktop\SAN-RP Scripting - PRIVATE\gamemodes\dw-rp.pwn(865) : error 047: array sizes do not match, or destination array is too small
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#2

Search for an array with such a name and show it to me! Some cells probably are defined too small...
Reply
#3

Quote:
Originally Posted by Twisted_Insane
Посмотреть сообщение
Search for an array with such a name and show it to me! Some cells probably are defined too small...
What do you mean?
Reply
#4

What's happening is:

Here's a function:

pawn Код:
myfunc(string[], string2[])
{
    new string3[10];
    strcat(string3, string2, sizeof(string3));
}
What that function does is a simplified version of what your AddRadioStation command is doing.
String3 can accept any string up to 10 characters long.

If we RUN that function, but set 'string2' to a larger size than what 'string3' can handle, we will recieve an error.
pawn Код:
myfunc(bob, aaaaaaaaaaaa); //12 'a's = string2[12]
The destination array can't accept more data than it's specified to store.

What you need to do is open up your include and change the size of the destination variable.

OR open the include, retrieve the AddRadioStation function and post it here. I'll edit it for you
Reply
#5

READ the error carefully, and do the same to my question: Search for an array in your script which is involved in this line you've posted! You somewhere got such an array!
Reply
#6

Nevermind, it was a string in the Include that was too small.

FIXED, Mods lock this.
Reply
#7

Usually, I wanted to explain the same thing when you had posted your array, but glad that you've found it yourself! :P
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)