SA-MP Forums Archive
problem with a string - 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: problem with a string (/showthread.php?tid=487703)



problem with a string - horsemeat - 14.01.2014

I am having a problem with a string this string in particulate

pawn Код:
printf("gaspumpuser = %s",gaspumpuser[count][gasstationid]);//remove
When my server loads it loads up till it hits 8 it must be some sort of out of bounds error here is the declaration of the string if I remove this line of code it will continue on in till it is finished loading

pawn Код:
new gaspumpuser[MAX_PLAYER_NAME][MAX_GASPUMPS][MAX_GASSTATIONS];
now since it hit 8 my MAX_GASPUMPS sizeof array is 8 so it might have something to do with that
and MAX_GASSTATIONS is 50 if you need that


Respuesta: problem with a string - Swedky - 14.01.2014

It is a three-dimensional array.

It is like that:


pawn Код:
printf("gaspumpuser = %s",gaspumpuser[count][gasstationid][/*BlahBlahBlah*/]);



Re: problem with a string - horsemeat - 14.01.2014

yes but the first dimension is a name witch is a string and I used the string symbol in the printf statement