Strange Error? [REP+] - 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: Strange Error? [REP+] (
/showthread.php?tid=328296)
Strange Error? [REP+] -
seanny - 24.03.2012
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.
|
Re: Strange Error? [REP+] -
Twisted_Insane - 24.03.2012
Search for an array with such a name and show it to me! Some cells probably are defined too small...
Re: Strange Error? [REP+] -
seanny - 24.03.2012
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?
Re: Strange Error? [REP+] -
Rob_Maate - 24.03.2012
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
Re: Strange Error? [REP+] -
Twisted_Insane - 24.03.2012
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!
Re: Strange Error? [REP+] -
seanny - 24.03.2012
Nevermind, it was a string in the Include that was too small.
FIXED, Mods lock this.
Re: Strange Error? [REP+] -
Twisted_Insane - 24.03.2012
Usually, I wanted to explain the same thing when you had posted your array, but glad that you've found it yourself! :P